[Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical
Haskell job in New York]
John A. De Goes
john at n-brain.net
Sat Jan 10 12:05:49 EST 2009
On Jan 9, 2009, at 8:23 AM, John Goerzen wrote:
> Well, you pretty much always have to get down to the C level on a *nix
> platform at some point, anyhow. You've got to make syscalls
Take a language like Ruby or Python (or Java, or C#, etc.). The vast
majority of code written in these languages does not "get down to the
C level". When I say, "vast majority", I'm referring to > 99.999%.
That's because the standard libraries provide sufficiently
comprehensive platform-agnostic abstractions to do what most people
need to do. As a result, libraries for these languages are built on
the standard libraries, and do not require native code.
> I don't think FFI is so evil. There is value in avoiding wheel
> reinvention, too. If zlib already works great, why re-invent it when
> you can easily just use what's there?
There are lots of reasons:
1. If there's a bug in a library, Haskellers are more likely to fix
the bug if the library is written in Haskell.
2. Haskellers are more likely to improve code that is written in
3. A chain is only as strong as its weakest link -- libraries with
more dependencies are more fragile, more likely to break, and less
likely to work across platforms.
4. Haskell-only libraries are easier to build, easy to use, and easier
to include in your program (this is subjective and we don't agree on
this one, so ignore it if you like).
5. Haskell libraries are generally more commercial friendly than the
GNU-licensed libraries that inevitably back FFI-based libraries.
6. Haskell libraries can more easily offer tight integration with
Haskell code, and take advantage of features unique to Haskell, such
as purity and laziness, and a declarative coding style.
A shining role model is the Java ecosystem. No platform has as many
open source, commercial-friendly, robust, feature-rich, and community-
supported libraries than Java does. These libraries are, in the vast
majority of cases, written in 100% Java, work identically on all
platforms, are as easy to use as adding a single file to your project
(Java also has Maven, which functions similarly to Cabal).
That's where I'd like Haskell to be in 5 years.
More information about the Haskell-Cafe