|
|
|
|
|
by mightybyte
4114 days ago
|
|
I 100% agree that JS and Python are the wrong language for writing languages. Haskell, however gets you the best of both worlds. Your sum_file function in Haskell would look like this: sumFile :: FilePath -> IO Int
sumFile file = sum . map read . lines <$> readFile file
I don't think many people would dispute that Haskell is at least as good as OCaml for writing languages. And strangely enough, the most advanced Perl 6 implementation is even written in Haskell! |
|
That hasn't been true for a few years, but it was true for quite a while. At this point Pugs is fairly out of date and (I believe) abandoned, as it's main developer discontinued development. For a long while it was the most advanced Perl 6 compiler though, and from what I understand a lot of it's rapid advancement was attributed to it being written in Haskell (Perl 6 and Haskell share a good portion of advanced features, so that may have helped).
The current state of support of the various Perl 6 compilers can be seen here[1].
1: http://perl6.org/compilers/features