Live data from Hacker News

Ruby adds experimental support for rightward assignments

blog.saeloun.com

171–172 of 172 posts

Re: Ruby adds experimental support for rightward assignments

#171

Earlier quoted context omitted.

The student paper is one of many examples of people inveighing against the passive while 1) providing incorrect examples, and usually 2) using it. It's amusing, but it's not the whole point: "The passive is of course perfectly respectable, and there is no reason to try to avoid it. (To say that it shouldn't be over-used, or it shouldn't be used where it is inappropriate, doesn't distinguish it from any other construc…

The sentence "The passive voice is overused." illustrates this tension well. When you omit the subject, (implicitly we all know who that sentence is referring to), passive voice is more concise, but it's not clearer. It's actually less clear because there's less information available. I think this is the distinction most commentator miss. In programming languages we often find better, we prefer explicitness over impl…

The passive lets you omit the subject gramatically. In every case, you can include an informative or uninformative subject. If you are including an uninformative subject, the passive is probably clearer.

The clearest is not the most informative; the clearest provides the most important information and the least distracting information.

"Helicopters were used to control the blaze" is no less clear than "the blaze was controlled using helicopters". And, assuming the news item is about the trajectory of the fire, it is much more clear than "Pilot John Smith, having just moved to the area from Baltimore where he attended school with a 3.7 GPA, helped control the blaze with a fire department helicopter" despite that offering quite a bit more information.

To your explicit claim, I contend that "the passive voice is overused" would not be made clearer phrased "writers overuse the passive voice".

Re: Ruby adds experimental support for rightward assignments

#172
post #57

Well, this is a nice coincidence, Nim also added support for rightward assignments today! https://play.nim-lang.org/#ix=2x7r

Funny you should mention it, raku just got the same feature! https://tio.run/##K0gtyjH7/7@4NEkhMy8ts8Lq0Gpbu0O7NVQSdRRUgG...

There's no need for a new operator. The R metaoperator respects precedence, associativity, etc.

my Int $age;

42 R= $age;

say $age;

Post reply on HN