Proposal request: explicit propreties

Steven Schveighoffer schveiguy at yahoo.com
Tue Apr 1 14:30:03 PDT 2008


"Derek Parnell" wrote
> On Tue, 1 Apr 2008 14:53:33 -0400, Steven Schveighoffer wrote:
>
>> Stdout("hello").newline()("world").newline;
>
>> ... using it in this way is pretty clear (and convenient).
>
> ?!Clear?! I haven't a clue what that code is supposed to be doing!
>
> Is it ...
>
>   Send "hello" to stdout.
>   Send newline to stdout.
>   Send "world" to stdout.
>   Send newline to stdout.
>
> If so, then the example is clear as mud. I think I prefer ...
>
>   Stdout("hello", newline, "world", newline);

Heh, I just meant how newline can be used as a property rather than a 
function, even though newline isn't a true property.

Stdout("hello").newline;
Stdout("world").newline;

is most likely how I would write it, probably to avoid having the extra ().

-Steve 





More information about the Digitalmars-d mailing list