top | item 44661580

(no title)

jamauro | 7 months ago

Generally I find static typing to be overrated, even more so with elixir due to pattern matching and immutability. I think elixir’s set-theoretic types will be a nice addition and will provide some compile-time safety checks without needing to explicitly define types for everything. It remains to be seen how far they’ll take this approach.

discuss

order

Muromec|7 months ago

Biggest benefit of typing in TS is just autocomplete that knows to filter down suggestions to field name of the object type before the dot. That and constants without typos. That, exhaustive maps and interface implementations are really good to not forget things that have to be done outside of the currently open file.

throwawaymaths|7 months ago

really you wind up making only a handful of type errors that make it into prod.

there are other things that contribute to this like pretty universal conventions on function names matching expected outputs and argument ordering.

it does suck hard when library authors fail to observe those conventions, or when llms try to pipe values into erlang functions, and yes, it WOULD be nice for the compiler to catch these but you'll usually catch those pretty quickly. you're writing tests (not for the specific reason of catching type errors), right? right?

victorbjorklund|7 months ago

I let the LLM write my tests. And when they fail it just rewrites the tests to pass.