The New CTFE Engine on the Blog

Ali Çehreli via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Apr 11 22:51:20 PDT 2017


On 04/10/2017 06:07 AM, Mike Parker wrote:
> Stefan has been diligently keeping us all updated on NewCTFE here in the
> forums. Now, he's gone to the blog to say something to tell the world
> about it.
>
> The blog:
> https://dlang.org/blog/2017/04/10/the-new-ctfe-engine/
>
> Reddit:
> https://www.reddit.com/r/programming/comments/64jfes/an_introduction_to_ds_new_engine_for_compiletime/
>

The first code sample is

private immutable ubyte[128] uri_flags = // indexed by character
({
     // ...
})();

and the text says "The ({ starts a function-literal, the }) closes it.". 
Why the extra parentheses? Just the curly brackets works, no?

private immutable ubyte[128] uri_flags = // indexed by character
{
     // ...
}();

Ali



More information about the Digitalmars-d-announce mailing list