On May 4, 2013, at 9:22 PM, Tod Hansmann wrote: > I didn't say it was a waste of time, I said it was asinine.
Oops. My mistake. > I can learn from two kids hitting each other over a toy, but it doesn't make > it less stupid. You're right about that. > I'd also point out that the excercise itself can actually be interesting, I agree! > but that's not what I was commenting on. Oh. :-( > The asinine part is the comparison, it's the conclusion jumping of whether > apples are > better than oranges or not. I think I understand why you are drawing this analogy. > Like Sasha says in his 5:01 MST email today, Haskell doesn't "beat" C. At > what? Your question "at what?" is probably rhetorical, but I think it actually has an answer: I thought it was clear that Sasha was talking about the speed of each language's solution to the specific string reversal problem. Re-reading the 5:01 MDT email, it seems like a conclusive answer to me. The proverbial "gauntlet" from a couple days ago. The Haskell-to-C comparison is particularly apt because both Haskell and C actually compile down to native code[1], whereas many of the other examples do not (Perl, Python[2], Java, etc). That might lead one to believe that Haskell could theoretically yield runtime performance as good as C for this problem. > Why does this matter? It doesn't, and yet that's the driver for Sasha for > some reason. I can see why you would think this doesn't matter. I can also see why Sasha would argue that it *does* matter. I personally think it's valuable to understand the performance limits of a programming language. And I find real-world metrics like these more compelling than conjecture and pretty interesting to boot. And yes, I think both Haskell and C were intended for tasks just like this one, so it's a fair and valuable comparison. I don't think anyone is waking away from this thread shouting "See, I told you C was faster than Haskell in all the things!!" > It's exactly the same as comparing how X handgun is better/worse than Y > hunting rifle. It's the same as comparing how X runner is better/worse > than Y swimmer, but at the shotput. You might learn a lot about the > human body and the shotput, and it might even be interesting, but the > comparison is ridiculous. I can see why you would make this analogy, but I don't personally find this conversation to be well represented by it. I see your point though. I just happen to disagree with it. No offense intended. Having considered your points and analogies (yes, all 4 of them: handguns, fighting children, athletes, and apples), I still feel the same about this thread, and I don't find any part of it to be asinine (especially when I look up the definition of "asinine", and I notice it contains the word "extremely"). --Dave [1] Yes, I know that Haskell can compile to bytecode, LLVM, and even C, in addition to native code. It has one of the most flexible toolchains of any language I am aware of. [2] Yes, I am aware of PyPy. In fact, I ran the [::-1] solution under PyPy and found that it performed at the same speed as CPython. Bummer. /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
