Are there languages with static types that compile to #Python the way #PureScript and #Elm compile to #JavaScript or how #Eta to #JVM or #F♯ to .NET CLR?
@22 What's the benefit? I generally use static typed languages for system programming, if performance matters. If performance is neglectable I use a programmer-friendly (dynamic typed) language. Why would I expose myself to the hassle of static typing, if the code finally gets translated to something closer to natural language?
@stefan I think many programmers use static types to manage complexity and aid abstraction, and not (mainly) for performance. Consider the TypeScript compiler which strips type information during codegen—types are only used up to compile-time, as programmer aids (maybe there's some optimizations that are enabled but I haven't seen any in my emitted code). Static typing my webapps and data analysis scripts makes refactoring and extending much easier than if dynamic. Does that explain my angle?
@wim_v12e @stefan Maybe I'm over-imagining how often this happens but—I'll change the name or type of something in one corner of my code, and suddenly my editor shows me four other places that I need to now update. I love that love that Rust and Elm have for me. It was a stark contrast, having that experience while developing frontend in Elm, versus the much scarier experience of writing the backend in plain JS, where the editor/language dgaf about my problems 😓
@wim_v12e @stefan But… while I have warm memories of Elm and Rust, and am confident that I could dive into those apps now, months after I wrote them, and break all kinds of things before fixing them up again, I do not have warm memories of developing (tiny little algorithms) in Haskell, which felt much less protective and much more, um, sadistic. Haskell didn't inspire the fear I had when developing dynamic languages like JS or Clojure, but it wasn't nice either… probably I'm not doing it right.