5 ms·
The Java example builds up a straw man. Never underestimate your readers!
by ExpiredLink 12y ago
The Java example builds up a straw man. Never underestimate your readers!
- the_af 12y agoWhy is it a straw man? It looks reasonable to me and I'm a Java programmer.
- ww520 12y agoFor one thing, the Haskell version is a non-inplace inefficient HelloWorld kind of qsort. For another, the Java version is rigged to add more unnecessary fluff.
- the_af 12y agoThe Haskell version isn't in-place and therefore not really quicksort, agreed, but that's a separate (though valid) criticism. It doesn't make a "straw man" of the Java version, does it? It would be a straw man if it said "here, look at a reasonable quicksort implementation in Java (absurd, bloated code follows)". The Java version doesn't really have a lot of unnecessary fluff. What, it's not a static method and has instance variables? So what? That doesn't add a lot of verbosity and is NOT the crux of the author's argument either.
- ww520 12y agoThe author was doing a section by section comparison of the two - Look! There's no Haskell needed for the corresponding Java code! He is deliberately showing verbosity in Java with an apple-to-orange strawman comparison. What else is he trying to show? The instance variable in class is an important strawman the author added to Java. He's trying to show the need of "state" in Java, which is not needed in a sensible Java version of qsort, as all data can be passed in parameters. He also made the statement that the instance variable is needed for recursion in Java (!) to "substantiate" (make up) the excuse for using instance variable in Java. And yes, those are called strawman.
- the_af 12y agoAh, yes, I didn't catch that he explicitly mentions state in the Java program, as part of the comparison. That is indeed a straw man.
- pohl 12y agoThis might be the first time I've seen someone accused of misrepresenting himself. Actually this programmer is me, right now at the moment of the writing.