←back to thread

160 points todsacerdoti | 2 comments | | HN request time: 0.65s | source
Show context
thomasvogelaar ◴[] No.41901399[source]
I don't buy the argument that a lot of the performance jumps from rewrites comes from developers writing more optimised code.

I've worked on multiple rewrites of existing systems in both JS and PHP to Go and those projects were usually re-written strictly 1:1 (bugs becoming features and all that). It was pretty typical to see an 8-10x performance improvement by just switching language.

replies(2): >>41901538 #>>41903162 #
Joker_vD ◴[] No.41903162[source]
Yeah, it reminds me about all those old "Haskell can be faster than C!" posts that used to be very popular. Sure, some exquisite, finely-crafted Haskell code can be faster than a plain, dumb, straightforward, boring C code. But if you compare plain, dumb, straightforward, boring Haskell code with plain, dumb, straightforward, boring C code, the latter will be faster pretty much always.
replies(1): >>41907168 #
nineteen999 ◴[] No.41907168[source]
Plus it will be readable by a much larger percentage of working programmers.
replies(1): >>41909976 #
1. tinco ◴[] No.41909976[source]
I'd rather have a code base I'm going to be working on in a language I haven't learned yet, than having it be in C or C++ if it's of any significant size. Learning a new language is small thing, all things considered, especially if it's a well designed one like Haskell.

Spending a week or two getting familiar with the way things are done in a language, and then gradually become effective in it and the specific codebase I would be working on for me at least would beat having to work in an environment with 50 years worth of irreconcilable technical debt inherent to the language.

replies(1): >>41911902 #
2. fredrikholm ◴[] No.41911902[source]
I agree with you fully, but I've also tried to onboard people to F# and Haskell and... unless you're the self selecting person that enjoys (typed) functional programming, the pushback you get from the other ~95% of developers is extremely strong.

If your stack is FP-ish, and you hire FP-ish developers, it's fine. But having non-FP devs write Haskell? Maybe I've been unlucky, but it's near impossible in my experience.