CTFE is getting too powerful :o)

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Mar 27 10:17:48 PDT 2013


On Wed, Mar 27, 2013 at 10:48:31AM -0400, Andrei Alexandrescu wrote:
> Found this: http://stackoverflow.com/questions/15652718/object-error-access-violation-when-printing-result-of-std-algorithm-cartesianpr

IMO, this is a compiler bug. If the compiler can't correctly generate
code for something, it shouldn't just keep quiet and generate wrong
code.


> Soon we'll need to clearly define the limits of CTFE, and what happens
> when it fails.
[...]

IMO, CTFE should be allowed to do the maximum of what's possible during
compile-time, regardless of current implementation limitations. Placing
arbitrary limits on it will hurt in the long run, I think. Of course,
defining absolute limits for it makes sense if said limits are
theoretical limits of compile-time evaluation. :)


T

-- 
No! I'm not in denial!


More information about the Digitalmars-d mailing list