4 ms·
The lack of a type system in Elixir is a productivity killer though :(
by bjz_ 7y ago
The lack of a type system in Elixir is a productivity killer though :(
- Dangeranger 7y agoYou can annotate your types if you want and get a lot of editor benefits. Also, I don’t buy the “we need strong types for everything” argument, as optional typing in Clojure, JavaScript, and now Ruby gives you lots of benefits without having to think all the way through the app’s architecture.
- chessturk 7y agoCan you give me an example of this? I'm genuinely wondering if I've just dodged a pain point so far. My other strongest languages are Golang and JavaScript, so I'm used to (duck-)typed and untyped approaches, and I've never felt that Elixir was difficult to work with because of the lack of types. I've treated pattern-matching like type inference, and as long as you have guard clauses, the worst that can happen is a runtime error which you "let fail" anyway. I guess the guard clauses are a bit of boilerplate, but I feel like these complaints have a different root. I just don't see it yet.
- girishso 7y agoThere’s no type system in Ruby too!
- strzibny 7y agoI think combination of type annotations and pattern matching actually works pretty well. Yes, it's not Rust though:)
- simplify 7y agoAgreed. If Elixir had static typing then Phoenix would be my dream framework!