Expression template

Etranger via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 23 16:36:40 PDT 2016


On Saturday, 23 July 2016 at 19:08:45 UTC, ketmar wrote:
> 2OP: sorry, i can barely read that code. this has nothing to do 
> with your skills, it is the topic -- i've never seen clean lazy 
> evaluation code. after all, this is a hack.
>
> still, i think that such a library worth at least some work.
>
> as for "is my code/approach is good enough", i know only two 
> answers.
> 1. yes, 'cause it works.
> 2. no, 'cause it doesn't work.
> so if your code works, it is good. ;-)
>
> i mean that such hacks will be somewhat ugly anyway, so just 
> write a brief explanation in comments and go on.
>
> sorry, it is probably not what you wanted to hear... ;-)

Oh no thanks ;-) I came here specially to see if there is some 
well known technique that I didn't hear about (I searched allot 
before posting here). If there is no such technique than it is 
just more interesting to explore !

Thanks all for your answers !

I thinks I'll continue exploring the lazy evaluation path and 
keep looking if there is a cleaner way to do it.
I'll specifically try to adapt lazy evaluation to ndsilces and 
see if I can have tangible results with benchmarks (by the way is 
there any good benchmarking lib like the #[bench] in rust that I 
can use ?) and study mir like it was suggested by Seb. I'll be 
very happy if I could contribute something useful for the D 
community :)


More information about the Digitalmars-d-learn mailing list