memoize

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jan 4 06:21:53 PST 2011


On 1/4/11 2:48 AM, %u wrote:
> Hi,
>
> I just wanted to say, it's funny how I did the *EXACT* same thing only **a few
> days ago**:
> http://stackoverflow.com/questions/245584/d-templates-coolest-hack/4437847#4437847
>
> Not counting the braces, the actual code is just 4 lines for the compile-time
> version, and 5 lines for the run-time version. The page above only has a link to
> one of these; both of the versions are here:
> http://ideone.com/q8lvf
>
> Pretty short, eh? I doubt that it can get any shorter than that code. :) Feel free
> to use my version inside the library. ("I hereby release the code to the public
> domain," to cover the legal stuff.)

Just posted a response to that thread, too. Somehow all that thread 
should spill into reddit :o).

One thing one figures by looking at that thread is not what's been done, 
but how much bigger the potential is.


Andrei


More information about the Digitalmars-d mailing list