From next C#

bearophile bearophileHUGS at lycos.com
Sat Apr 5 14:17:52 PDT 2014


Upcoming features in C# (the text contains some extraneous chars, 
like in the 0b0010\_1110; literal):

https://gist.github.com/anonymous/9997622

Declaring out arguments at the calling point is nice, but 
returning a tuple as in Python/Haskell is better:

GetCoordinates(out var x, out var y);


It's also nice the syntax to define struct/class members with the 
same name as class arguments as in Scala/TypeScript. But in D you 
can't use this syntax because those are template arguments:

class Customer(string first, string last) {

A solution is to use two groups, as for functions (but the 
default is the opposite for functions):

class Customer()(private const string first, private const string 
last) {

Bye,
bearophile


More information about the Digitalmars-d mailing list