Don wrote:
Bill Baxter wrote:
On Tue, Nov 17, 2009 at 4:17 AM, Don <nos...@nospam.com> wrote:
Bill Baxter wrote:
On Tue, Nov 17, 2009 at 2:07 AM, Don <nos...@nospam.com> wrote:
Travis Boucher wrote:
I've been playing with string mixins, and they are very powerful.
One thing I can't figure out is what exactly can and cannot be
evaluated
at compile time.
How about C functions? Any chance those'll ever work? Particularly C
stdlib functions. They're one of the major things I'm finding
prevents std.string functions from being used CTFE.
I don't think it could ever work. CTFE needs to have the source available.
If we really needed to, a few C stdlib functions could be made into CTFE
intrinsics. But in general, no.
Some form of if(__ctfe) will happen, though.
What about having compile-time access to dynamic libraries, implemented
via dlopen() etc? Basically a compile-time FFI? There's nothing
fundamentally unkosher about that, or so it seems to me. It would
certainly be a big jaw-dropper feature for a C-like language. LISP has
it, right? :)
Cheers, Kuba