logoalt Hacker News

draw_downtoday at 12:46 PM2 repliesview on HN

I’ve worked in two places now with Ruby Sorbet servers. Ruby always drives me nuts how things are just in-scope and we don’t know why or where they came from.

I certainly wouldn’t want to go back to working in dynamic languages without typing on top. That takes too much brain power, I’m too old for that now.

I would say Sorbet seems more “basic” than something like Typescript. It handles function calls matching signatures, potential nulls, making sure properties actually exist, that kind of thing. Whereas TS can get quite abstract, and at times you’re fighting to convince it that a value actually is the type you say it is.

TS is very powerful and expressive, to the point that it’s possible to do computation within type code. I’m not convinced I always need that power, or that it’s always more help than hindrance.


Replies

vidarhtoday at 2:14 PM

> Ruby always drives me nuts how things are just in-scope and we don’t know why or where they came from.

irb(main):005:0> Foo.new.method(:bar).source_location => ["tmp/test.rb", 5]

show 1 reply
wutwutwattoday at 1:48 PM

> I certainly wouldn’t want to go back to working in dynamic languages without typing on top. That takes too much brain power, I’m too old for that now.

> and at times you’re fighting to convince it that a value actually is the type you say it is.

Might just be allocating that brain power to the same task but calling it a different thing.