4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions
comment 6y ago · link · parent
I know about the === operator, but the original one still exists, as does all the code that was (and still is) written using it that needs to be reasoned about. That you think adding a non-obvious alternative to the language magically makes the problem go away, suggests to me that you are the one lacking understanding, not me. It was also just one example of many well documented issues with the language.
> the === operator, which is what everyone uses
Since you accused me of "broadcasting without research", I'd like to see the evidence for this claim. I just looked at the HackerNews JS and there's plenty of double equals in there.
comment 6y ago · link · parent
No, they fundamentally rejected JavaScript, enough to build a whole new language and set of tools. This was not a subtle dislike of a few aspects of it.
Personally JavaScript absolutely terrifies me, it's a semantic mess, the equality table is one such example: https://dorey.github.io/JavaScript-Equality-Table/
comment 6y ago · link · parent
Scala does not use Hindley-Milner, which is why it has much poorer type inference compared to Haskell or OCaml. It uses subtyping to encode sum types and under many circumstances will infer "Any" for a type.
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
For background reading in this area, perhaps start with "A poor man's concurrency Monad" by Claessen, it's a very easy read and shows how green threads can be written as a user library allowing pluggable schedulers. F# also implements its asynchronous workflows using essentially this technique, see "The F# Asynchronous Programming Model". LINQ and the reactive library Rx from C# are also great examples of Monads.
comment 6y ago · link · parent
Or perhaps because no paradigm is universally applicable to all cases. There will be a bottom line impact if the wrong tool is picked for the job.
comment 6y ago · link · parent
I'm not convinced a shared memory abstraction is a good thing for distribution across machines. Some Beowulf clusters actually had much lower latency interconnects than ethernet, e.g. Quadrics, but we still needed to carefully optimise the traffic. With a shared memory abstraction, such optimisation is out of our hands.
comment 6y ago · link · parent
The NixOS configuration language is a unifying layer of abstraction and allows people to more easily re-use the work of others (compare with pasting commands from a how-to blog post).
comment 6y ago · link · parent
comment 6y ago · link · parent
This is no reason to avoid arguably the most popular (and state-of-the-art) function language and implementation out there.
comment 6y ago · link · parent
comment 6y ago · link · parent
If you want to see what a modern K or Q might look like (with static types and an embedded JIT compiler!), checkout the excellent Hobbes project from Morgan Stanley: https://github.com/Morgan-Stanley/hobbes
comment 6y ago · link · parent
comment 6y ago · link · parent
And functional programming languages can support imperative programming and mutation, even Haskell. It's a question of what should be the default, which depends on the domain you are working in.
> Any real banking system has much more than a ledger to deal with.
Most banking systems are cobbled together from third-party components and libraries. Low-level languages aren't really needed. Many banks use Python, which is orders of magnitude slower than Haskell.
> This comment strikes me as if it comes from someone who never dealt with significant amount of data.
Actually I have a background in distributed computing, where functional programming abstractions have made processing large amounts of data much easier (MapReduce, Spark).
> FP can be extremely wasteful; take head-tail lists for example, which are the default container in many FPs.
This is a strawman. I can write inefficient code in any language. C++ code can be littered with pointer indirection and memory barriers.
> Sometimes, arguing with FP purists feels like debating socialists.
I am a socialist.
comment 6y ago · link · parent
comment 6y ago · link · parent
Another example might be a text editor buffer. Immutable persistent data structures allow one to get many features for free such as versioning, undo, lockless autosave. Memory is cheap now, there's less of a need to throw away some my edits with destructive updates. Even filesystems and databases have realised this is good idea. Destructive updates are bad for valuable data.
Imperative programming is only better for writing low-level system code, which is full of state that ultimately no one in the real world cares about.
comment 6y ago · link · parent