3 ms·
After my first few years in Python (before types), followed by my last few years in Lisp/Elixir, I am skeptical of types. Can someone point me to specific exam
by djaouen 3y ago
After my first few years in Python (before types), followed by my last few years in Lisp/Elixir, I am skeptical of types. Can someone point me to specific examples where types are not just more code to maintain/make things uglier?
- Alifatisk 3y agoI can't directly point you to any specific example but when I tried Typescript for a project, I found that the type hinting and autocomplete was sooo much superior, especially in cases when the codebase and its abstractions grew in size and layers. The types helped me understand how the data looks like even though it was multiple abstractions away from me, I could still visualize how the data looks like as paramter and what I should expect. This is what I miss in Ruby, it still requires some cognitize load to understand what type of value I am handling without using a debugger. This is also why Rubys autocomplete is lacking, because the dynamic typing is so complex that is it barely possible to accurately predict which type it is without executing it.