232 karma · joined May 10, 2019
The way I see it is that Haskell abstracts away the runtime considerations. You spend the majority of your time modeling your business domain in Haskell. Or rather, retrofitting your business model into Haskell's type system.
In Elixir, in contrast, you spend the majority of your time building systems, in other words on runtime problems. All the tooling and even the whole OTP revolves around this. For anything that runs on the web, this is a major benefit compared to Haskell.
As for ADTs and the like, these are very basic features used all over Haskell code, combined with pattern matching. There are much more advanced abstraction concepts that are used all over Haskell libraries.
I'm sure C++ has good facilities for abstraction. However, as it lacks many of the very advanced abstractions that Haskell has, I find it far fetched that C++ could be described as an equally high level language as the likes of Haskell. From what I understand, that's not even the intention of C++ to begin with.
Btw thanks for that reference to Mark Dominus, seems like interesting stuff!
Franky, HK's struggle looks hopeless to me.
I haven't been able to get exposure to a language that is comparable in abstraction power with Haskell, except for DSLs.
China can hate the USA as much as they want but from all I can see they have no intentions on waging war with the US over something as minor as HK is for them.
Look at how almost no one is willing to even acknowledge Taiwan's independence in fear of Chinese reaction. Unfortunately, HK's case is much more hopeless than Taiwan's.
I've invested some time in picking up Haskell and it's been worthwhile personally. When you know C, Java/(some OOP lang) and Haskell, everything else sort of falls in between. Ultimately makes your journey easier as a developer.
A more appropriate comparison would be with commonly used high level languages such as Java and Python. The comparison here is meaningful because you'd build similar software with them as you would with Haskell.
Edit: year
I'd hope we would have a big list of recent examples of major innovations from the Nordics but unfortunately nearly all the major digital products or innovations seem to be decades old. I can't think of almost any globally really promising Finnish digital startup right now.
That's putting words into my mouth. I'm not complaining, merely observing. You're free to want more socialism, nobody is stopping you. I'm not saying one system is better than the other, they all have their own merits.
USA attracts top talent with top salaries, these are the people who are prepared to work hard and expect to be compensated well for that. They understand it's a sacrifice and they're willing to make it. Working willingly hard for a high compensation is not what I'd describe as exploitation.
Such a person in a Nordic country is working hard yet not compensated well for it. I don't see that as a better outcome for them and neither do they - that's why they emigrate to the USA. It's hardly relevant for building their own lives that there's some poor people living elsewhere in the USA.
HK has maybe a difficult terrain?
I doubt China ultimately cares about loss of face.
I guess my problem with TS ADTs is just that they're done with the TS primitives whereas they could be true first class citizens. But such a feature may be too hard to swallow for your typical JS developer whose first introduction to types is Typescript.
Btw can you elaborate on that Enum with ADTs? Or did you mean that you use Enums with switch-case? I use it too and find it one of the best bits of TS.
Estonia I've always just considered a Baltic country, which I suppose is accurate as well. Not that these definitions really matter anyway.
The Scandinavian countries focus on leveling the playing field for everyone. It allows the less privileged to build a good life, but it also hinders the most ambitious ones. Whereas USA is happy to focus on the extremes, allowing places like Silicon Valley to flourish.
We can argue endlessly whichever is better for the society, but professionals often choose the place to live based on what is best for them, not what political model some place runs on.
We use Google, Facebook, Youtube, Snapchat, Whatsapp, Apple - all American products. Whereas the Nordic countries produce very few major digital innovations used globally.
Also, I didn't know Estonia was a Nordic country.
In Finland the tax rate for $100K USD would be 41.3% on average. The common consumption tax is 24% (VAT). On top of that, certain goods like alcohol, gas, cars, could have additional goods specific tax that could be well over 100%.
Unemployment stands at I think 6.6%.
Sweden sure is doing well with digital innovations but can't say that the rest of the Nordics are performing equally as well. USA still has Silicon Valley which outperforms every other region in the world.
However, coming from a truly terse language like Haskell you'll just feel TS is too verbose and not very elegant. TS is the most verbose and least elegant of the languages I'm personally using, on par with Dart.
ADTs not only feel dirty because they're not first class citizens (you build them with the TS primitives by adding a discriminating union key) but also somewhat useless since you don't have pattern matching.
Although pattern matching would not be a trivial problem to solve in TS. It could be solved with the compiler, however, you'd still have to hack the compiler API quite a bit too and TS doesn't even support integrating custom extensions with a config file like Babel does.
Btw thanks for pointing me to that ts-purify, it looks good!