Why Ruby?

Nick Sabalausky a at a.a
Sun Dec 12 12:37:33 PST 2010


"Simen kjaeraas" <simen.kjaras at gmail.com> wrote in message 
news:op.vnl77cjyvxi10f at biotronic-pc.lan...
> Nick Sabalausky <a at a.a> wrote:
>
>>> void myfun(void delegate(string) lol) {
>>>        lol("say it ");
>>> }
>>>
>>> void main() {
>>>        myfun = (string what) {
>>>                assert(0, what ~ " lol");
>>>        };
>>> }
>>> ========
>>
>> I'm sure that's going to disappear when D's properties get implemented as
>> intended.
>
> I'm not. Consider:
>
> @property void myfun(void delegate(string) lol) {
>        lol("say it ");
> }
>
> void main() {
>        myfun = (string what) {
>                assert(0, what ~ " lol");
>        };
> }
>

Oh yea, a getter. Of course. I see now.




More information about the Digitalmars-d mailing list