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 😓
@22 @stefan I think that just shows how important personal preferences are when it comes to programming languages. And I guess it also depends a lot on what you already know. And probably also on the purpose or nature of the program you're writing. I write compilers, and for that purpose, programming in Haskell is still "wow, sooo elegant!".
It does in deed not have much in the way of editor support -- or maybe I just don't invest enough in learning what my editor can do.
@22 @stefan Not that I quite understand how a programming language can be protective or sadistic.