I think Python's way isn't amazing, but it's not too bad either:
d, r = divmod(100, 3)
int d, r; refs(d, r) = divmod(100, 3);
It's clear you like stack based languages, and I certainly admit they can be concise.
I think Python's way isn't amazing, but it's not too bad either:
It's a bit uglier in C++, but you could make this work: I'm certain there's either a Boost or STL library for this. (I wrote my own for C++98 at one point)It's clear you like stack based languages, and I certainly admit they can be concise.