[Haskell-cafe] Well typed OS
Joachim Durchholz
jo at durchholz.org
Fri Oct 5 21:09:13 UTC 2018
Am 05.10.2018 um 21:46 schrieb MarLinn:
>
> It seems when a Haskell projects gets a bit larger people tend to search
> for ways to make it more modular. They try plugin frameworks, OS-level
> dynamic linking, on-the-fly compilation etc. But I repeatedly get the
> feeling that all these current approaches aren't actually very good. But
> what if we had some kind of specialized format for compiled, dynamically
> loadable, typed Haskell libraries? Something between a plain OS library
> and bytecode. This might help make programs more modular while keeping
> them type safe.
I've been believing that having a strict, universally-understood binary
format was the one thing that enabled Java's library ecosystem. Which is
huge, with a constant evolution of new generations and survival of the
fittest.
The downside is that compatibility with an established binary format is
a pretty restricting design constraint on language evolution - you
cannot evolve the language in ways that require a change to the binary
format, unless you are willing to give up compatibility with all the
precompiled binaries that are around.
I think it's doable, if the binary format has been carefully designed to
allow the kind of extensions that are being tought about.
The other prerequisite is that if a change to the binary format is
unavoidable, old formats stay readable. I.e. the loader needs to be able
to read old format, indefinitely. Alternatively, code repositories could
convert the code at upload time - the compatibility code would then live
in the repositories and not in the loader (which makes the code harder
to write but keeps the runtime smaller).
Well, that's what I can say from the Java and repository perspective.
I'm pretty sure there are other, and more important perspectives :-)
Regards,
JO
More information about the Haskell-Cafe
mailing list