Re: How far can CTFE go?

2012-02-04 Thread Manfred Nowak
H. S. Teoh wrote: If this was code generated by an external utility I wasn't argumenting for using external utilities, but against the argument, that separating code for separatable phases would obfuscate the code. for more than one _needed_ phase compile-time validation of generated code

Re: How far can CTFE go?

2012-02-03 Thread Timon Gehr
On 02/03/2012 04:26 AM, Manfred Nowak wrote: H. S. Teoh wrote: I don't think that should be grounds to get rid of CTFE, though. In contrast to your remark, I do not see the benefits of reducing two compiling phases to one. For me CTFE ist nothing else than running the executables of a first

Re: How far can CTFE go?

2012-02-03 Thread Timon Gehr
On 02/03/2012 12:22 AM, H. S. Teoh wrote: I'm experimenting with pluggable expression parser modules, and I'm wondering if I can use CTFE to build parser tables and such. What are the current limitations of CTFE? Are dynamic arrays of structs supported? Associative arrays? What about

Re: How far can CTFE go?

2012-02-03 Thread H. S. Teoh
On Sat, Feb 04, 2012 at 01:54:55AM +0100, Timon Gehr wrote: [...] On another level, how far are we expecting CTFE to go eventually? In my mind, the ideal situation would be that CTFE can replace writing an arbitrarily complex helper program that generates D code (either functions or data,

Re: How far can CTFE go?

2012-02-03 Thread Manfred Nowak
Timon Gehr wrote: You probably haven't made extensive use of the feature. That is correct. - needed for a third compilation, needed for a fourth compilation, needed for a fifth compilation ... Provide an example please and I will change my opinion. - better syntax, can do complex things

Re: How far can CTFE go?

2012-02-03 Thread H. S. Teoh
On Sat, Feb 04, 2012 at 02:36:10AM +, Manfred Nowak wrote: [...] - better syntax, can do complex things without obfuscating the code If the codes for more than one _needed_ phase are tangled into one code base, I call that an obfuscated base. [...] One major advantage of CTFE that is

How far can CTFE go?

2012-02-02 Thread H. S. Teoh
I'm experimenting with pluggable expression parser modules, and I'm wondering if I can use CTFE to build parser tables and such. What are the current limitations of CTFE? Are dynamic arrays of structs supported? Associative arrays? What about compile-time cross-module initialization? The idea is

Re: How far can CTFE go?

2012-02-02 Thread Manfred Nowak
H. S. Teoh wrote: the ideal situation would be that CTFE can replace writing an arbitrarily complex helper program Aebitrary complex helper programs may include viruses and other nice surprises. Walter does not want that adminstrators have to worry about a compilation step to torture the

Re: How far can CTFE go?

2012-02-02 Thread H. S. Teoh
On Fri, Feb 03, 2012 at 12:51:51AM +, Manfred Nowak wrote: H. S. Teoh wrote: the ideal situation would be that CTFE can replace writing an arbitrarily complex helper program Aebitrary complex helper programs may include viruses and other nice surprises. Walter does not want that

Re: How far can CTFE go?

2012-02-02 Thread Manfred Nowak
H. S. Teoh wrote: I don't think that should be grounds to get rid of CTFE, though. In contrast to your remark, I do not see the benefits of reducing two compiling phases to one. For me CTFE ist nothing else than running the executables of a first compilation in order to get some values