←back to thread

140 points ksec | 1 comments | | HN request time: 0.198s | source
Show context
simply-typed ◴[] No.41083880[source]
The fact IntelliSense and jump-to-source are supported at a very superficial level goes to show the heavy drawbacks of dynamic types.

Sorbet may fix things, but at that point, just use a language with more mature tooling around types, like Python or TypeScript.

Dynamic types offer dubious marginal benefits but bring tons of downsides. The demonstrations in this article reflect that.

replies(6): >>41083934 #>>41083947 #>>41084060 #>>41084088 #>>41084115 #>>41084491 #
ecshafer ◴[] No.41083934[source]
I like coding in Ruby a lot more than Python or Typescript. From using the Ruby LSP in the article daily (though I am not on the team) I can say it works quite good and I have very few issues with navigating Ruby source. If I were very worried about types, going to Python or Typescript seems like not a very good solution. Python barely has more type support than Ruby, and Ruby is making a lot of gains in this area. Might as well go to an even more expressive and powerful language like F#, Haskell, Ocaml, Scala, or similar.
replies(2): >>41084293 #>>41085751 #
maleldil ◴[] No.41084293[source]
> Python barely has more type support than Ruby

That's not true. mypy and Pyright (the main type checkers) are very ahead of Ruby's Sorbet, and Python actually has proper ergonomic syntax to work with types, which Ruby doesn't. It's also seeing constant development to bring more powerful typing and syntax.

Also, typing has become part of the Python culture, which means most of the big libraries have type hints. It doesn't seem like that is the case with Ruby, where type hints aren't as prevalent. Even the core maintainers don't like the idea and want to keep it as dynamic as possible.

replies(1): >>41084439 #
jshen ◴[] No.41084439[source]
I've had the hardest time getting mypy to work well in vscode. Trying pyright with neovim now, curious how it goes.
replies(2): >>41084540 #>>41084738 #
1. ReleaseCandidat ◴[] No.41084738[source]
Instead of Pyright use Based Pyright for anything that isn't Code, and in Code (not Codium) you can use Pylance instead.

https://github.com/DetachHead/basedpyright