4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions
comment 7y ago · link · parent
comment 7y ago · link · parent
What tasks exactly do you think Java is better suited to than Haskell? The "innovation" of Java was to take the runtime of a high-level language and combine it with the productivity of a low-level one. It is not well particularly suited to systems programming or high-level programming (e.g. ML and analytics, parallelism, concurrency).
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
But Google and Facebook have permitted this in-house (Go,Dart,Hack,Reason etc). They have since open-sourced them, but these projects are still run from within. I don't see this as a red flag, these languages all have good reasons to exist.
> Google’s in-house monorepo tooling that grew out of a series of historical Perforce accidents is a huge red flag of dysfunction
Google probably has the largest repo in the world, no off-the-shelf product is going to work. I fail to understand why building their own tools to accommodate their own special needs is a red flag of dsyfunction?
comment 7y ago · link · parent
comment 7y ago · link · parent
The real reason for giving up Turing equivalence was probably to get dependent types. This gives very powerful static guarantees, including the presence/absence of fields under non-trivial record operations such as merge. In using dependent types, they have also had to give up significantly on type inference, which is really going to annoy the average JavaScript/Ruby programmer.
comment 7y ago · link · parent
Not true. There is hardware that is better made and more reliable than Apple (e.g. ThinkPad) and operating systems that are far more secure (e.g. Qubes).
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
Your view on the role of types is unfortunate if you think term logic is simply mirrored at the type level (Plato's Cave). The Curry-Howard correspondence tells us to think of types as logical propositions with terms as their proofs.
comment 7y ago · link · parent
Static type systems can absolutely catch logical bugs! Proof that a list is non-empty or that a reference is never null are simple examples.
> Types do not contain the real logic of your program.
Types can completely determine the logic of many parts of your program. In Haskell, I often don't have to write custom traversal code, it's selected for me based on the types.
> Types are somewhat useful for verifying data is passed around in the correct shape in a program
This is only the start of what types can do, try learning Haskell.
> but to say it prevents most obvious errors is naive.
No, naive is dismissing static type systems to the point that not even extra testing is done to compensate.
> Elm you will waste tons of time doing useless tasks like writing encoders/decoders and code that could be moved to macros in a more powerful language.
Elm's aim is to be a basic easy-to-learn language (no operator overloading etc). Personally, generic (polytopic) programming feels like a more elegant approach than macros. Haskell offers both.
comment 7y ago · link · parent
There are also many other significant differences. I estimate I am about ten times more productive in Haskell than Java.