Two different languages I've used in the distant past used @ for expansion.

auto t1 = {1, "hi"};
auto t2 = {2, "yo"};

auto t3 = {t1, t2}; // == {{1, "hi"}, {2, "yo"}}
auto t4 = {@t1, @t2}; // == {1, "hi", 2, "yo"}

Are there still unspecified plans for @, or is it now available for something like this?

Regarding the $ident syntax (which I was glad to see, since my first question when reading the DIP was whether a way existed to do that), couldn't the @ syntax then be allowed for this as well, with expansion of a scalar defined as the scalar itself?

int x = 1;
if ( auto {@x, y} = tmp ) // {1, y} = tmp

if ( auto {x, y} = tmp } // same as in DIP

Reply via email to