I am developing functional domain specific embedded language within C++ to translate formulas into working code as concisely and accurately as possible.
I posted a proto
I would prefer a more solid separation between loops. For example, I'd prefer this alternative notation to your second example:
sum(range(j) < N)[sum(range(i) < j)[(T(i,j) - T(j,i))/e(i+j)]]
I also find the range syntax difficult. I think a range should be a single component. I'd prefer something like so:
j = range_iter(0,N)
That would open for range x(0,N); j = range.begin();
or alternatives I can't think up right now.
You could even:
j = range_iter(inc(0) => exc(N));
for j iterates over [0,N).
Anyway, interesting idea. Can your resulting functions be composed? Can you request domain information?