On 2016-08-03 09:20, Lodovico Giaretta wrote:
On Tuesday, 2 August 2016 at 15:32:50 UTC, Jacob Carlborg wrote:
* Does it work at CTFE?
I don't think so.

It would be cool if it did. I think it would at least be worth taking a couple of minutes and investigate if it does work or not. If doesn't work, what it would take to make it work.

Most parts in D work at CTFE but there are some particular things that are not compatible like allocating with malloc instead of the GC. I see that allocators are used, not sure how well those work at CTFE. At least in theory the GC allocator should work.

You are talking about upper/lower cases in the names, right? I will
correct them in the Phobos PR.

Yes, and some methods use Java style getters and setters, instead of D style properties. Example:

// Java style
int getFoo();
void setFoo(int foo);

// D style
int foo();
int foo(int foo);

In D, the above can be called like:

Bar bar;
auto i = bar.foo;
bar.foo = 3;

/Jacob Carlborg

Reply via email to