Amber

bearophile bearophileHUGS at lycos.com
Sun Dec 23 18:52:03 PST 2012


Kelly:

> Might be incomplete, but here is the start of a list:
> https://bitbucket.org/larsivi/amber/wiki/Diff_D1


Thank you for the link, it's an interesting list of differences. 
Some comments:

> No comma expression

We have had some discussions to disallow the comma operator in D2 
too.


> No foreach_reverse.

I love foreach_reverse. It makes my code simpler and more 
readable, and avoids me some bugs.


> Omitting override is an error.

This will happen in D2 too.


> Array literals don't necessarily allocate, so auto a = [1, 2]; 
> a[0] = 2; may segfault.

Do you mean cause stack overflow? Both Go and Rust languages 
avoid this in most cases using segmented stacks.


> No C-style arrays

I'd like them to go in a state of perpetual deprecation, because 
they are handy when I port C code to D, but at the end, in later 
stages of the porting, I prefer to use only one style of array 
declarations in my code.

At least in D2 I'd like D to disallow mixing C style arrays with 
D style ones:
int[] c[5];
http://d.puremagic.com/issues/show_bug.cgi?id=5807

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list