6 ms·
I have definitely noticed a functional programming to golang pipeline. Multiple people used Haskell and switched to Golang. Interesting anecdotes.
by olah_1 5y ago
I have definitely noticed a functional programming to golang pipeline. Multiple people used Haskell and switched to Golang.
Interesting anecdotes.
- dcolkitt 5y agoWhen you're dying from the compile time of functional languages, you really appreciate Golang's near instant compiles.
- dwohnitmok 5y agoThat's mainly Haskell and Scala. OCaml and Elm have as fast or faster compile times.
- anuragsoni 5y agoNot all functional languages are made alike. OCaml compile times can rival Go's.
- G4BB3R 5y agoThe cause is not being functional, but having dozens of extra features and multiple syntaxes for the same thing, both Scala and Haskell suffer from that. On the other hand OCaml is very fast and Elm is the fastest compiler I've ever seen. Edit: oops there was already a similar comment when I posted
- saghm 5y ago> Elm is the fastest compiler I've ever seen Compared to the other languages you mention there, I'm not surprised that Elm has the fastest compiler; compiling to an actual binary (or something low-level like JVM bytecode) definitely seems like it would take more work to compile to than something much higher level like JavaScript, especially if you're performing optimizations at each intermediate layer. That's not to knock Elm though; obviously having a fast compile time is a good thing regardless of the reason, and it certainly still would be possible for someone to accidentally write a slow compiler to JavaScript!
- pharmakom 5y agoCompiling to binary can be plenty fast, especially JVM code. It’s optimisation that really takes time.
- Cthulhu_ 5y agoIn a modern stack though, compiling a JS or Typescript project takes ages; I don't believe it's the rewriting, optimizing and minification per se, but more the huge amounts of code and files that need to be processed.
- kaba0 5y agoElm is fast because it does only the subset of Haskell’s feature set. It doesn’t have as strong a type system, it uses eager evaluation and I guess it mostly falls back on the JS runtime for optimizations.
- orbifold 5y agoIn reality the Elm compiler is probably orders of magnitude slower than clang, it just has much less work to do. A C++ compiler needs to parse / preprocess 100k+ lines of code even for something like hello world.
- rak1507 5y agoI would appreciate it if golang was any good. Unfortunately, it isn't. (It isn't functional either, so I'm not sure what point you were making)
- deleted 5y ago[deleted]
- pharmakom 5y agoI don’t think this comment adds anything to the discussion. Perhaps add a few of the anecdotes? Or even a theory as to what’s going on?
- exo762 5y agoMay you elaborate? Some Haskell users I know are not fans of Golang. What were the reasons for the switch?
- randomswede 5y agoIf you like elaborate[0] typing and immutable everything, Go really is not the language for you. [0] I don't know Haskell that well, but my understanding is that its type system is capable of expressing more intricate types than the Go type system.
- rad_gruchalski 5y agoI was tired of having to provision the runtime and dependencies. Native binaries with no dependencies was the reason to change to go.