While we're lynching features, how bout' them omittable parens?
Nick Sabalausky
a at a.a
Tue May 19 01:15:08 PDT 2009
"Jesse Phillips" <jessekphillips at gmail.com> wrote in message
news:gutbro$14ev$1 at digitalmars.com...
> On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
>>
>> I still want to get rid of omittable parens (and function-call-as-a-lhs)
>> anyway. They're a horrible substitute for a real property syntax.
>
> I don't like C# properties, IMO it is pointless overhead. I agree you can
> misuse the omittable parentheses, but what is a "real" property syntax?
> Seems to me both D and C# provide the same syntax they are just set up
> differently.
D leaves the function/property distinction up to the caller, which is
rediculous because in most cases only one or the other actually makes sense.
C# places the responsilibily for that function-syntax/property-syntax choice
on the callee instead, where it belongs.
D's approach is like saying "You can index an array with 'myArray[5]' *or*
'myArray+5', and you can add two numbers with 'myInt+5' *or* 'myInt[5]'.
Either way, it's your choice!!". It's a completely useless form of
flexibility and comes at the cost of encouraging confusion.
More information about the Digitalmars-d
mailing list