But yes, it's a lot of work and they probably should document what the trade-offs are that they have made.
2,890 karma · joined June 30, 2015
But yes, it's a lot of work and they probably should document what the trade-offs are that they have made.
EDIT: looks like Amazon HD might force re-sampling of 44.1KHz to 48KHz on Android, which is a shame if true.
Stripping comments before handing off to a JSON parser is not a full solution. For example, if the file has to be augmented with additional data and written out again, the comments would be lost.
Yes that is why I think (1) and (2) need a new language.
> And 3 would have also prevented a gazillion 1s and 2s from being still with us?
I disagree. Most new features have been implemented as extensions that must be enabled with language pragmas. This is not the same thing as large breaking changes in the standard libraries.
1) better structural types. For example, polymorphic extensible records and variants. These could even be the basis for all algebraic data types. Current encodings have poor syntax and poor type inference (due to non-injective type families). The need to make all records nominal types really gets in the way when dealing with structured data. Python is the main competitor here; and so we could also just use strings and maps, but we can do better.
2) a better module system. Even Miranda had a better module system than Haskell. OOP has first-class modules.
3) a better commitment to backwards compatibility. There have been controversial and breaking changes to Haskell's standard libraries that have done more harm than good. This has likely damaged industrial adoption of Haskell. For example, my employer, a prominent Haskell sponsor, is stuck on a 7-year old version.
Unfortunately the above problems are difficult to retrofit for and so I think a new language may ultimately be needed.
As an anecdote, I once saw a stack overflow reply from a distinguished OOP engineer advocating for modelling a bank account with an object containing a mutable balance field! That is certainly not modelling the domain (an immutable ledger). OOP might fit some problems well, but the cult of presenting it as the one-true-way (made concrete in 90's Java) is deserving of a backlash IMHO.
map : (A -> B) -> [A] -> [B]
It's quite clear from the above type signature what this function does and does not do. It can only use the supplied A's to create B's using the supplied function. It cannot do anything else with the A's and the B's. To me, that is clarity.
Haskell never claimed to "get rid of side effects", the idea is make them explicit in the types and to be able to reason about them.