dsimcha <dsim...@yahoo.com> wrote:

== Quote from Denis Koroskin (2kor...@gmail.com)'s article
That said, I don't think there is a need for something like this.
Certainly no speedup and little clarity compared to declaring variable
right before invoking doStuff.

Here's an example of where it would be a useful piece of sugar, given an unpack
function that I was playing with:

// How it works now:
uint foo;
string bar;
unpack(foo, bar) = someFunction();

// vs. how I want it to work:
unpack(auto foo, auto bar) = someFunction();

If foo and bar die right after this line, I feel this is acceptable.
But declaring variables inside a function call seems to me hard to
decipher and hardly ever a good idea.

--
Simen

Reply via email to