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 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.
@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.