Possible Lazy Keyword? (Re: Array comprehensions and the like)

JAnderson ask at me.com
Mon Jul 21 23:15:45 PDT 2008


Era Scarecrow wrote:
> JAnderson Wrote:
>> I guess that could be useful.  One way you could do prime numbers is 
>> with a string mixin.  However you couldn't do anything that relies on 
>> stuff available at run-time with that.
> 
> 
>  I wasn't meaning strictly prime numbers, it's just a good example to connect code to. I was meaning, being able to use a compiled function (or a function we can compile and run without having to keep) in order to fill in some static data. Requirements? How about for those functions that you can duplicate your data with only what you input to it, and no real library/filesystem help. But most of those examples are mathematically easy to program.
> 
>  Era

Check out mixins.  They are seriously a powerful concept and should 
allow you to do what you want, albit a little verbose.

-Joel



More information about the Digitalmars-d mailing list