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?
@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.
@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.
@wim_v12e @stefan Atom has absolutely superb support for Elm and Rust, and Haskell too! (I used the IHaskell Jupyter kernel with the Hydrogen Atom plugin.) See screenshots at
https://twitter.com/gratidue/status/812519548100476928
Yes, I should be clear that in my mind "a language" is the whole experience—Elm and Rust are new and very focused on "DX" (developer experience), but Haskell also gave me great feedback about what was wrong with my code and how to make it better. I will do more Haskell/PureScript someday for sure.
@22 the craft of programming is a cosmos of choices. It's always exciting to learn how other developers solve problems.