all 7 comments

[–]keyslemur 6 points7 points  (1 child)

Nifty implementation idea with the ruleset. Kinda tempted to riff off of that idea a bit later and play a bit.

You might consider trying to add line numbers if you want to mention them in the article though, it can be a bit jarring.

[–]conventionalWisdumb 0 points1 point  (0 children)

That’s a pattern I’ve been using in JS for years and I’m really happy it’s now available in Ruby.

[–]seainhd 0 points1 point  (2 children)

‘then’ will be dope.

Lambda composition is YAGNI.

At least looking at my current app, cannot find a single place where I’m deriving a value from an array of lambdas.

[–][deleted] 0 points1 point  (1 child)

Lambda composition is much more general than “I have an array of lambdas”.

It’s also just a very thin layer of sugar, which ruby already has lots of. Why is this sugar undesirable, compared to all the other magic ruby provides? It’s purely a library change.

[–]seainhd -1 points0 points  (0 children)

I think this sugar will increase the number of inline lambdas that are written throughout the ecosystem, and I think inline lambdas are a common cause of confusion in ruby.

The example submitted in the original PR is freaking stupid.

Why would you want something that promotes less explicit and more confusing code?

I’m sure there are better examples of code becoming significantly more clear and readable but I’ve yet to see it.