Make dur a property?

Simen Kjaeraas simen.kjaras at gmail.com
Thu Jan 24 05:20:52 PST 2013


On 2013-00-24 05:01, Nick Sabalausky <SeeWebsiteToContactMe at semitwist.com>  
wrote:

> On Wed, 23 Jan 2013 22:59:38 +0100
> "monarch_dodra" <monarchdodra at gmail.com> wrote:
>>
>> --------
>> IMO: We should be able to keep the optional parenthesis for all
>> functions (except maybe those that return delegates).
>
> I'm not a fan of that as I think the need for special-casing of
> functions returning delegates is not worth what I still don't see as a
> benefit.
>
> Side note: I know at least one person here likes this [ ;) ], but I
> really hate code like:
>
> foo.doStuff;
> foo.makeFizzBar;
> foo.updateBlorg;
>
> Have to do a double-take every time. Just looks like a bunch of
> no-ops, and sets off mental red flags every single time.

Amen!

I do understand Adam's view that foo.bar(10).baz(5) be allowed,
but that could be written with(foo){bar=10;baz=5}. Admittedly more
verbose, but also clearer.

On that topic, I occasionally do miss C#'s object initializers,
particularly because they could allow for immediate creation of many
const and immutable values.

-- 
Simen


More information about the Digitalmars-d mailing list