Mixin template evaluated to string can convert to string mixinexpression implicitly
kenji hara
k.hara.pg at gmail.com
Fri Jun 24 10:08:52 PDT 2011
I already checked the test implementation passed dmd build/test and
phobos build/test.
You can checkout 'implicit_mixin' branch from my repository
(https://github.com/9rnsr/dmd/) and use it.
Note: A simple way to construct environment for build dmd/druntime/phobos is:
1. Expand newest release package.
2. Replace dmd2/src/dmd, dmd2/src/druntime, and dmd2/src/phobos to
checkouted git repositories.
3. Copy https://gist.github.com/1045205 into dmd2/src
I am using this makefile for build every day.
3. Run make in dmd2/src: make
Caution:
In Windows, building compiler needs digitalmars make and MSYS cp command.
And dmd test suite needs cygwin-make.
Kenji
2011/6/25 Alex_Dovhal <alex_dovhal at yahoo.com>:
> "kenji hara" <k.hara.pg at gmail.com> wrote:
>> My proposal is just a syntactic sugar.
>> You can develop such library without it.
>
> yes, but still stable DMD release can't handle pointers in CTFE.
> And without such syntactic sugar it's ungly to write something like that
> mixin(sum!q{i : iota(N); mixin(sum!q{j : iota(M), j !=i ;
> (i+j)/(i-j) }) });
> this looks much better
> sum!q{i : iota(N); sum!q{j : iota(M), j !=i ; (i+j)/(i-j)}};
More information about the Digitalmars-d
mailing list