Live data from Hacker News

Ruby adds experimental support for Rightward assignments

blog.saeloun.com

1–10 of 39 posts

Re: Ruby adds experimental support for Rightward assignments

#5
To me this seems like a clear loss. The syntax is (as far as I can tell) strictly more verbose than the existing assignment syntax. Ruby is already plagued by a million-and-one ways to do everything, but at least in other cases simplicity (à la zen of Python) trades off for brevity.

Re: Ruby adds experimental support for Rightward assignments

#7
post #3

A better example IMO is... Before: result = case value when 5 ... when 4 ... end After: case value when 5 ... when 4 ... end => result The latter allows for some nicer formatting I think.

At the expense of increasing the complexity to read code.

Re: Ruby adds experimental support for Rightward assignments

#8
post #3

A better example IMO is... Before: result = case value when 5 ... when 4 ... end After: case value when 5 ... when 4 ... end => result The latter allows for some nicer formatting I think.

At the expense of increasing the complexity to read code.

How is the complexity increased?
Post reply on HN