Probable C# 6.0 features
Xinok
xinok at live.com
Tue Dec 10 20:53:09 PST 2013
On Tuesday, 10 December 2013 at 18:58:01 UTC, Suliman wrote:
> Maybe it would be possible to get some good idea from next
> version of C#
> It's only ideas about next version, but new future maybe next:
> http://damieng.com/blog/2013/12/09/probable-c-6-0-features-illustrated
Regarding #1 (Primary Constructors), I think the feature has
limited usefulness which doesn't deserve a presence in the
language and it would serve to confuse newbies who weren't aware
of that feature. I prefer to consolidate existing features and
make them more flexible to serve other purposes. For example, an
old idea of mine is a syntax like this (assuming D had
Python-style tuples):
this.(x, y) = (x, y);
The syntax would generate a tuple from members of this.
Similarly, one could also generate arrays or dictionaries by
writing this.[x, y].
Regarding #9, I see it's uses, but I wonder if it would be a good
idea to implement it. My initial thoughts are that it would make
grep'ing for declarations more difficult and I think it would
actually make code more difficult to read. Also, due to order of
evaluation, you couldn't use the variable until after the
statement in which it's declared, e.g.:
x + foo(out int x)
More information about the Digitalmars-d
mailing list