6 ms·
Rust isn't a bizarre comparison at all. Suppose I have before me some programming task. I can choose Rust, Haskell, or something else. Anyone arguing for Haskel
by spekcular 5y ago
Rust isn't a bizarre comparison at all. Suppose I have before me some programming task. I can choose Rust, Haskell, or something else. Anyone arguing for Haskell in 2021 (2022?) has to justify why it's a better tool for the job than Rust.
- the_af 5y agoWhy? I'm not trying to be dense. Are you saying for every programming language you choose, you make an strict ordering of every existing language and then decide which one you'll pick? Do you think there is a strict ordering of "is better than" between Haskell and Rust?
- spekcular 5y agoI'm saying that programming languages are tools for completing programming tasks. So, yes, when faced with a task I think about which one is best. Examples: Need to copy a bunch of files? Use bash. Need to do a quick Monte Carlo simulation? Probably use Python since it allows me to write it the fastest (based on my familiarity). Need to write drivers? Use C. I don't think there is a strict ordering of "is better than" between Haskell and Rust. I think for many purposes they are roughly equivalent, and for some one or the other is more suited to the task. But, if I can't identify any problem for which Haskell is a better tool than Rust, why would I ever learn Haskell?
- the_af 5y agoHow can you identify the problem if you first don't learn Haskell? How would you even decide you want to learn Rust and not Haskell if you didn't know either? Hype? Popularity? Because your coworkers know Rust, or the codebase is in Rust? Those are all good reasons, honestly! So if you were in a Haskell shop, you'd have reason to prefer Haskell over Rust. There's your answer. Either will be better than Python for a medium/large project, but likely worse for a really tiny script or program. How did you pick Python over Ruby? They are very similar, yet they have many differences. Think about it, and there's another answer for you.
- spekcular 5y agoHow do I decide? I look at the features and documentation for each language, and try to figure out what problems it is best suited for. I also ask various people I trust (and HN commenters!). I agree: If the problem is "How do I get paid?" and the best available job requires learning Haskell, then learn Haskell! But, I think this is kind of an evasive answer. First, not many jobs require Haskell, so if my choice of language is dictated by economic concerns I'm better off with, say, Python or various web dev stacks. Second, because I have in mind a situation in which the implementer has a fixed problem and is trying to figure out which language to use. (A personal project, say.) I'm sorry if this was not clear. So, I ask again: are there any problems for which Haskell is a better solution than Rust? edit: Regarding the Ruby question, I think the language has various flaws, but going into detail would take way too time. A shorter answer is: numpy, scipy, pytorch, numba.
- the_af 5y ago> I look at the features and documentation for each language, and try to figure out what problems it is best suited for Well, and what have you found so far in relation to Rust and Haskell? It seems to me you know what you have to do. Let's assume your answer is "I read every introductory page in wiki.haskell.org, read and worked through a couple of tutorials, and I still cannot figure it out". If so, do you think a comment here in HN is going to convince you of picking language X over Y? > So, I ask again: are there any problems for which Haskell is a better solution than Rust? Realistically, which kind of answer do you expect? A summary of the "Why Haskell" and "Why Rust" pages? I'm sure they exist and you could take a look at them and decide.
- spekcular 5y ago> If so, do you think a comment here in HN is going to convince you of picking language X over Y? Yes. Because I'm a highly fallible person and very open to the idea that a Haskell expert might be able to point out a good use case that I missed. > Realistically, which kind of answer do you expect? A summary of the "Why Haskell" and "Why Rust" pages? I'm sure they exist and you could take a look at them and decide. The selling point of Rust is (very, very) roughly "C++ without the bad parts, and some more good parts." Given the demonstrated utility of C++ (and demonstrated pitfalls) this is manifestly appealing. Avoiding memory safety related security holes alone is huge. That's an example of the kind of answer I expect.
- youerbt 5y ago> Anyone arguing for Haskell in 2021 (2022?) has to justify why it's a better tool for the job than Rust. You ask for a lot of reasons considering the amount you dare to provide. No, nobody has to do that, it doesn't make any sense. Let Rust people comment under articles about Haskell why Rust is the better choice.