2 ms·
Those are good points, but really not an argument against FP. String could have originally been an abstract data type in Haskell. There are of course disadvant
by willtim 9y ago
Those are good points, but really not an argument against FP. String could have originally been an abstract data type in Haskell.
There are of course disadvantages to the Java string approach, in that there is potentially a lot of code duplication inside the String class. There will also always be some situations that will require you to unpack the string into an array of chars, because a particular method does not exist.
There are plenty of things that Java got wrong. Threads and concurrent programming in Java is particularly difficult to get right without expert knowledge. Haskell makes concurrent programming much easier. I've worked with both professionally and feel that Haskell got more things right.