Thanks so much for compound declarations!

Hi!

I am starting to use compound declarations and thus far I always thought these are not a big deal. But I was wrong in that - my code is so much easier to read. Now I can make the declaration of later variables dependent on earlier calculations; very useful for index wrestling. Cool.

Thank you so much! Very nice feature.

Sebastian

3 Likes

Mitzi’s the one who coded it up. Took quite a bit of work,
but I’d been wanting that to get in for years. She also added
the array expressions and will be doing vector and matrix
expressions soon.

C++11 brings closures, which means we should be able to
get rid of a lot of the packing and unpacking in integrate_ode
calls and system functions.

  • Bob

Really great stuff the compound declarations!

Array expressions? What was that? The sub-indexing story (which is also great, although I managed to find already possible enhancements ;) )?

C++11 brings closures?? Whow, I did not know that. Closures are extremely useful and will probably remove lots of those little helper objects with tons of references just by plugging things into closures.

int a[3] = {1, 2, 3};

Works for any type, not just int. It’ll get more useful when
we can write

vector[3] b = [1, 2, 3];

or

matrix[2, 3] c = [[1, 2, 3], [4, 5, 6]];

  • Bob

That’s awesome. I didn’t realize that made it into the last release. Looking forward to vectors/matrices.