Blog: Why Ruby Still Feels Like Home After All These Years

I found this blog post highlighting some less commonly mentioned niceties of Ruby.

Some of those are obviously shared by Crystal (delegators, #tap, general expressiveness)
Some are arguably even better (fibers, stdlib, performance)
But quite a few are also missing in Crystal (refinements, #then, anonymous block parameters.

There’s also a discussion thread on lobsters: Why Ruby Still Feels Like Home After All These Years | Lobsters

These are used seldom enough that I don’t see any reasonable value adding them, at least not at this point. I’ve seen them used once in app code, and there it didn’t make any sense. Perhaps there are libraries that use them to good value, but I havn’t really seen any examples spelunking around in code.

What I find myself missing the most nowadays are endless defs (ie oneline method defs) and `meth(foo:)` being the same as `meth(foo: foo)`. Apart from those two examples most of the stuff I miss go the other direction nowadays.

`then` I use now and then, but it isn’t adding enough value to miss it.

EDIT: Oh, actually `it` is something I miss too. The numbered block parameters can stay unimplemented - I’ve never seen anyone use them and I don’t see why you’d want to.

Ruby dev here, experimenting with Crystal. This is my first post on here!

As far as syntax, I miss hash/kwarg value omission ({foo:}), and to a lesser extent it and #then.

On the other hand, I’m finding lots of goodies in Crystal that aren’t in Ruby.

Yeah, I was quite surprised to see refinements at the top of the list :person_shrugging:

I think for some more modern features like anonymous block parameters or pipeline methods, we intentionally held back to wait until the dust settles on the experiments in Ruby. Maybe we could pick some of that up for Crystal :+1: