Hacker News new | ask | show | jobs
by zelly 2094 days ago
So now there are basically no dynamically typed languages left. There's Scheme, JavaScript, what else? All languages nowadays are converging to TypeScript/Rust. It's kind of sad.
7 comments

Static typing seems like the underdog outside of Java EE/big enterprise stuff.

A matter of perspective, I suppose. You seem to like dynamic typing so static typing seems ubiquitous and inescapable. I find dynamic typing completely infuriating over 100 lines or so, and dynamic typing seems inescapable.

Others have pointed out the big dynamically typed languages, so I won't rehash, but suffice it to say, there basically are some dynamically typed languages left.

Julia, Python, Racket, Ruby, Common Lisp, Erlang, Clojure, etc...

But in my opinion, dynamic typing is a terrible idea for production code.

All of those offer static type checking. Python and Ruby's don't necessarily change how the code is compiled, but it might in the future. Common Lisp declare/declaim/proclaim changes the way the code is compiled; it's not just a linter. Clojure is definitely not dynamically typed, unless you consider Java to be dynamically typed.

Also dynamic typing is more productive (for application code, not talking bootloaders here). It's a measurable fact and apparent to anyone who has written code long enough. Writing out types for everything is mostly pointless clerical work which should be able to be done by computers.

what do you mean? you can certainly use vanilla javascript if you really want, same with ruby. its not like types are forced down your throat
Ditto for Python, you can not use the type hints/don't run MyPy.

OTOH, by skipping typing you lose a lot of guardrails and won't discover bugs until runtime.

RBS is optional.
It won't be optional in Ruby 4, most likely.
Why would you think that? There's no evidence that dynamic typing is going away Type hints are optional precisely because they're not convenient for many cases, and the add-on type systems cannot fully express the capabilities of the language.
Seems unlikely. Ruby is all about options.
Yeah, I second the opinion that this remains optional. Ruby won't become a java-wannabe , that's a fight it cannot and would not want to win. Ruby is dynamic.
I wish I could predict the future with as much certainty as you.
Python is pretty popular
I hear x86 is dynamically typed
x86 and similar (such as Forth) are considered typeless.
Is JavaScript dead? what the fuck is my browser running?
babel, typescript mostly and soon wasm
c, c++