Omittable parens is an evil
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Mon Aug 4 09:47:31 PDT 2008
Tomasz Sowiñski wrote:
> Mike Wrote:
>
>> For me it's mostly that there's a clear _VISUAL_ distinction between "this
>> does something" (parens) and "this is data" (no parens); and in D there's
>> no difference in this one (arbitrary) edge case. It's easy to "eyeball
>> scan" code using parens pairs as visual anchors.
>>
>
> I agree. When coding, at first, I was glad to be able to snip the parens (makes code look cleaner), but then I came to the same conclusion - the illusory cleanness of code strikes back in the form of trouble with telling "something" and "do something" apart.
>
> C# has proper properties. Why mess with the classic?
>
> Tomek
I agree. In the few D code I've written, I've already run into several
bouts with that problem. I'm sure it looked cool at first ("hey, here's
a simple trick that allows one to implement properties cleanly"), but
while it implements properties "cleanly", it messes up function
invocation and introspection *a lot*... :(
I think the ommitable parenthesis syntax should be removed, and a proper
syntax for properties created (and I don't mind that the first is done
before the second is).
--
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list