www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - The New CTFE Engine on the Blog

reply Mike Parker <aldacron gmail.com> writes:
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/
Apr 10 2017
parent reply =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
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
Apr 11 2017
parent Stefan Koch <uplink.coder googlemail.com> writes:
On Wednesday, 12 April 2017 at 05:51:20 UTC, Ali Çehreli wrote:
 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
Yes it would work. But I like to distinguish function-literals from blocks :)
Apr 12 2017