HNHacker News
TopNewBestAskShowJobs

zhisme

271 karma · joined January 16, 2025

Pragmatic software engineer

My blog available at https://zhisme.com/

submissionscomments
zhisme··on Tinder cuts 13% staff in latest bid to reverse declines
I think people just tired of this app. Now it is shown by numbers and the owners can understand that
zhisme··on Past, present, and future of Sorbet type syntax
Any reason you stick to ruby? Why not use any statically typed language which offers this feature out of the box? We don't argue against typing. We argue about typing like it is done in ruby rbs/sorbet.
zhisme··on Past, present, and future of Sorbet type syntax
The thing is I don't want ruby to meet the fate of javascript. Javascript community is much bigger than ruby will ever be. They had to manage so many people writing too many code, and invented tool for them so they can contribute without making them learn completely new programming language. Easier to jump in. And I should mention typescript types is much better than what we have in rbs/sorbet. They have types inside language, without annotation like what we have separate sig DSL in ruby.

We should invent new programming language typed_ruby and give him separate life, and then history will prove us whether it should have been implemented in the first place. But not try to push it into stdlib and persuade everyone else that it is the right way to go.

zhisme··on Past, present, and future of Sorbet type syntax
With great power comes great responsibility.

It is developer responsibility to ensure that you will not receive cat during designing stage of your classes. And inheritance is bad, this is also sharp knife. But annotating everywhere

      sig { params(cat: Cat) }
does not improve your design, it just makes noisy and clumsy. I would think that if your code need type annotations, it smells like bad design and should be considered for refactoring.
zhisme··on Past, present, and future of Sorbet type syntax

  Ruby is a language that grants you lots of freedom.
Nobody can argue that. With freedom we can do anything, but anyone wondering why in first place?

What about wisdom and pragmatic approach? If you ever need types why not choose typed language for your case, but instead re-implementing something and wasting so much time for work that has no real use. Why not use c-bindings for typechecks, this feature is already available in ruby *rb_obj_is_kind_of(value, rb_cString);* and has no cost. Is it wise? I don't think so, I would be shocked if I saw such code in production.

We care so much about environment and climate changes, but think it is ok to waste resources for such activity. It is not research task. People really advocate to use in real-world applications such thing as sorbet. DHH even removed typescript from his frontend libraries, and this types is like kindergarten for some homemade rack/hanami/dryrb application that will server 2 people in production (creator of this stuff and random visitor). Maybe someone could tell me why we need such thing in ruby ecosystem like rbs/sorbet library. I'm really wondering. Not because ruby grants us freedom and we can do that. That's not an answer. We can do enormous count of absurd things. But the question is why?

← PreviousPage 2 of 2