Re: ctfe library

2010-04-21 Thread Don
bearophile wrote: Don: I've found that the function below improves things immensely. I might propose it for std.metastrings in the next Phobos release. Can you tell me what this function can be useful for? Thank you, bye, bearophile If you have recursive mixins (such as appears in many of t

Re: ctfe library

2010-04-20 Thread bearophile
Don: > I've found that the function below improves things immensely. I might > propose it for std.metastrings in the next Phobos release. Can you tell me what this function can be useful for? Thank you, bye, bearophile

Re: ctfe library

2010-04-20 Thread Don
Ellery Newcomer wrote: On 04/20/2010 10:17 AM, Don wrote: I don't see anything particularly ugly or hacky about CTFE code, like the code below: int greater(int a, int b) { if (a>b) return a; else return b; } int [ greater(short.max/3, 515) ] foo; It isn't. Things don't get ugly until you hi

Re: ctfe library

2010-04-20 Thread Ellery Newcomer
On 04/20/2010 01:02 PM, div0 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ellery Newcomer wrote: As ctfe support matures, I dream of a full-fledged parser generator that can be evaluated at compile time, although that's way more heavy duty than what most people will need. My spirit

Re: ctfe library

2010-04-20 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ellery Newcomer wrote: > > As ctfe support matures, I dream of a full-fledged parser generator that > can be evaluated at compile time, although that's way more heavy duty > than what most people will need. > My spirit port might be an option at som

Re: ctfe library

2010-04-20 Thread Ellery Newcomer
On 04/20/2010 10:17 AM, Don wrote: I don't see anything particularly ugly or hacky about CTFE code, like the code below: int greater(int a, int b) { if (a>b) return a; else return b; } int [ greater(short.max/3, 515) ] foo; It isn't. Things don't get ugly until you hit the relatively low cei

Re: ctfe library

2010-04-20 Thread Don
Ary Borenszweig wrote: Ellery Newcomer wrote: Are there any good libraries for ctfe/code generation? I don't know, things like parsing support for compile time strings, string formatting, type <-> string My project seems to be growing ctfe, and it's all horribly hacky and ugly code. I thi

Re: ctfe library

2010-04-20 Thread Don
Ellery Newcomer wrote: Are there any good libraries for ctfe/code generation? I don't know, things like parsing support for compile time strings, string formatting, type <-> string My project seems to be growing ctfe, and it's all horribly hacky and ugly code. I've found that the function

Re: ctfe library

2010-04-20 Thread Ary Borenszweig
Ellery Newcomer wrote: Are there any good libraries for ctfe/code generation? I don't know, things like parsing support for compile time strings, string formatting, type <-> string My project seems to be growing ctfe, and it's all horribly hacky and ugly code. I think all ctfe code is horr

Re: ctfe library

2010-04-20 Thread Ary Borenszweig
Ellery Newcomer wrote: Are there any good libraries for ctfe/code generation? I don't know, things like parsing support for compile time strings, string formatting, type <-> string My project seems to be growing ctfe, and it's all horribly hacky and ugly code. I think all ctfe code is horr

ctfe library

2010-04-19 Thread Ellery Newcomer
Are there any good libraries for ctfe/code generation? I don't know, things like parsing support for compile time strings, string formatting, type <-> string My project seems to be growing ctfe, and it's all horribly hacky and ugly code.