Thanks for noticing.
What I mean by the latter is that Haskell can displace C++ by wrapping C++; i.e, instead of the interface being written in C++ for Sigma and SC’s Mu codebase, it’s written in Haskell instead. It is not wholly replacing C++; Haskell does not have the high and predictable performance needed for that, but it is replacing part of a C++ system.
You can consider this, to an extent, being Haskell replacing C++ by having a powerful type system that can increase code correctness and expressivity.
In contrast, Haskell is not sufficiently better than Rust for these purposes that it’s worthwhile building a Haskell interface for a Rust application.
@satoshi778
I have been criticized in the past for wanting too much Haskell adoption, and I think people new to Haskell tend to go through such a phase, where they’re incredibly besotted with Haskell and would like everyone to use it.
However, given current trends, encouraging Haskell adoption is somewhat similar to simply wanting Haskell adoption to stay at current levels, since there are Haskell users dropping the language for Rust.
The thesis of this thread is that Haskell has a hard time competing with Rust right now because for high-performance applications, Rust is has more and more predictable performance, while having a larger ecosystem, a larger pool of developers, and being easier to train for.
However, performance and safety is not the only benefit of Haskell’s nature as a pure, strongly and expressively typed language; Haskell is also capable of being extremely terse and being, for a developer trained in the FP paradigm, easy to write.
That is to say, Haskell is suitable to attack Python’s use cases, and in doing so, maintain its social and library ecosystem. Haskell isn’t the best qualified for this purpose; half of Python’s strength is its extensive and easy-to-use ecosystem, which Haskell lacks. However, I think Haskell still has sufficient advantages in performance, safety, and expressiveness to compete with Python, and moreover, trying to compete with Python will ultimately come down to whether or not Haskell has a competitive ecosystem that is both broad and easy to use.
I would say that if Python’s use cases get targeted, the side effect will be a broader and easier-to-use Haskell ecosystem, which is a net gain.
@brandonchinn178
As far as scripting goes, I wouldn’t consider Haskell optimal because Haskell is typically compiled (interpreter without O2 tends to perform relatively badly, although generally it’ll outperform Python substantially), and because Haskell’s syntax requires names wrapping your script, whereas OCaml and Python can execute commands on the top-level. However, Haskell’s terseness makes it competitive enough, and the scripting ecosystem, while not ideal, seems sufficient. If you absolutely demand top level scripts, script :: IO (); script = {…;} using the brackets and semicolon to override significant whitespace and write everything on the first column.
For prototyping, I think most are aware of the old Aegis code prototype study that Hudak (RIP) published? https://www.cs.yale.edu/publications/techreports/tr1049.pdf
You can use Ada as a benchmark in this regard; Haskell took less than half the time of the equivalent Ada code to prototype (C++ never completed), and around 3 times that of a logic-programming Lisp, while creating code with greater maturity than either.
It’s just that, while, apparently, there was interest in Haskell as a prototyping language in the 90s and 00s, Haskell didn’t evolve into that direction, and I’d consider the standard TyDD idiom neither excellent nor terrible for prototyping (write your types, build up a program as undefined, then fill in the blanks is pretty competitive, but it’s easy to get the types wrong when you’re doing exploratory programming) . On inquiries in /r/Haskell, some Haskellers seem to have obtained a level of success with Haskell prototyping, but the advice seems contrary to standard TyDD.
While I’d consider Haskell as a scripting language relatively explored (it’s easy to try, there are libraries for it), the prototyping direction is interesting precisely because while some Haskellers have had success, many Haskellers regard Haskell as unsuited for such. That suggests that the Haskell prototyping space is ripe for exploration and development.