class extensions

Chris Nicholson-Sauls ibisbasenji at gmail.com
Thu Aug 30 05:47:18 PDT 2007


Alexander Panek wrote:
> Bill Baxter wrote:
>> [...]
>> But Walter seems to think it's ok the way it is.  Given that, I can 
>> definitely see how he'd think making a.foo uniformly interchangable 
>> with foo(a) makes sense.  I guess with property syntax and this 
>> combined we'll have
>>    "a.value" == "value(a)" == "value = a"
> 
> Oooh it looks like this would be possible to write:
> 
> 3.times = (int a) { Stdout(a.toUtf8).newline; }
> 
> ...fun! :D

I reiterate what I've said about three times now: I watch as D slowly turns into Ruby.  :)

(Although I actually like pseudo-members.  ColdC has this as well, but by modifying a 
type-lib object; $String.foo() callable as "abc".foo() for example.)

-- Chris Nicholson-Sauls



More information about the Digitalmars-d mailing list