New in C#4

Jarrett Billingsley jarrett.billingsley at gmail.com
Wed Oct 29 14:09:50 PDT 2008


On Wed, Oct 29, 2008 at 4:59 PM, bearophile <bearophileHUGS at lycos.com> wrote:

> So the second line is a char longer. But I agree it's a not unimportant detail.

Double negative "not unimportant" -> "important" ?  ;)  I know, you
just made a mistake.

> In Python x = 5 is never an expression (this precisely to avoid the typical bug of C code of using = instead of ==).

OK.

> And the named arguments don't change the value of the variable in the calling frame:
>
> x = 10
> f(x=5)
> print x # Output: 10

I'm not saying that named parameters would in D.  Your example is
precisely what I meant by "f(x = 5) already has a well-defined meaning
in D."  You're not telling me anything new.

> Overall I agree than the syntax with the colon is probably better for D.
> (While a syntax that I don't like much is the .. instead of : to define an array slice).

In Python, in Python, in Python.  I'm pretty sick of hearing about
Python.  D is not Python, D did not come from Python, D is not made to
cater to Python users and is not designed for the same things that
Python is used for.  Syntactic choices for symbols, operators, or
keywords is a completely moot issue.  Please drop it.



More information about the Digitalmars-d mailing list