The most twisted D code (you've) ever written

Myron Alexander no-spam at no-spam.zzz
Fri Oct 12 09:18:30 PDT 2007


Frits van Bommel wrote:
> Myron Alexander wrote:
>> downs wrote:
>>> ([&update]~([1, 2] /map/ (int e) { return &prefetch /fix/ (currentStrip
>>> + e); })) /map/ &Pool.addTask;
>>
>> What is /map/ and /fix/? Are these valid D constructs? If so, where in 
>> the language spec are they as I am very interested in learning more.
> 
> map and fix are struct types with static opDiv_r that return a struct 
> with opDiv, which returns the actual result.
> He uses them to approximate infix operators.
> He's been polluting #d on Freenode with them for a while now ;).

I wonder if there are any plans for adding list comprehensions to D. Not 
a question, just a musing.

Thanks for the info.

Myron.



More information about the Digitalmars-d mailing list