While we're lynching features, how bout' them omittable parens?
BCS
ao at pathlink.com
Tue May 19 13:02:28 PDT 2009
Reply to Ary,
> Steven Schveighoffer wrote:
>
>> On Tue, 19 May 2009 00:29:17 -0400, Ary Borenszweig
>> <ary at esperanto.org.ar> wrote:
>>
>>> Jesse Phillips escribió:
>>>
>>>> On Mon, 18 May 2009 21:53:06 -0400, Nick Sabalausky wrote:
>>>>
>>>>> "Chad J" <chadjoan at __spam.is.bad__gmail.com> wrote in message
>>>>> news:gut1od$l56$1 at digitalmars.com...
>>>>>
>>>>>> Lionello Lunesu wrote:
>>>>>>
>>>>>>> "Chad J" <chadjoan at __spam.is.bad__gmail.com> wrote in message
>>>>>>> news:gut0f2$jc0$1 at digitalmars.com...
>>>>>>>
>>>>>>>> Nevermind properties. Any chance we can forbid the omittable
>>>>>>>> parentheses, at least in the lhs of an assignment expression?
>>>>>>>>
>>>>>>> This is not because of the omittable parens. Even with added
>>>>>>> parens that code should not compile!
>>>>>>>
>>>>>> Agreed!
>>>>>>
>>>>> 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.
>>>>
>>> What I like in C# about properties is that they are like "pure"
>>> functions, so they don't have side-effects (this is just a contract
>>> on the semantic of properties).
>>
>> AFAIK, this is not enforced by the compiler...
>>
>> I write C# properties that have side effects.
>>
> That's what I said it's a contract on the semantic of properties. :)
>
> But now I'm curious: what kind of properties do you write?
>
You can have side effects, but it makes the code darn near impossible to
debug. I've been there and don't plan on going back!
More information about the Digitalmars-d
mailing list