Ruby adds experimental support for rightward assignments

This was posted by one of our members via one of our automated news source trackers. If you feel this thread could be in a better category or could include better tags and you are at Trust Level 3 or higher, please feel free to move/edit it :+1:

Interesting stuff, so basically you can do this;

42 => age

instead of this:

age = 42


[170, 65] => height, weight

instead of

height, weight = [170, 65]

It’s an experimental feature, which means it could be removed depending on the feedback received.

What do you think? Would you use it?

I wonder if something like:

42 >> age

Might be worth considering too?