Omittable parens is an evil

Mike vertex at gmx.at
Sat Jul 19 12:58:24 PDT 2008


On Sat, 19 Jul 2008 21:03:28 +0200, Jarrett Billingsley  
<kb3ctd2 at yahoo.com> wrote:

> "Nick Sabalausky" <a at a.a> wrote in message
> news:g5tdll$2sjj$1 at digitalmars.com...
>
>> I'm not sure if I'm completely following you here. Are you basically
>> saying that being able to call function foo by shortening "foo();" into
>> "foo;" confuses the issue of whether you're referring to the function
>> itself or actually trying to invoke it?
>
> It's true!

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.

-Mike

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list