This is all very instructive; thanks a lot. I'm wondering if you have 
benchmarked your nim codes with, say, C/C++ alternatives (or even a simplified 
C++ code you wrote yourself). Dealing with GC is something new to me; I'm 
concerned how this would impact numerical simulations, for example, if 
dynamically allocated vectors/matrices are everywhere in the code.

I had a look at the term-rewriting templates; I don't think this is what I want 
to use (although it could complement with the approach I' trying, based on 
objects that represent expression nodes). You've said `They only work if the 
expression is done in a single line though so the techniques you used in C++ 
are probably more general`. I'm wondering if there is a way to achieve a 
similar effect with Nim then? Wouldn't general template methods permit this 
(not the term-rewriting templates)?

Reply via email to