Date: Tue, 9 Sep 1997 17:53:54 +0900
From: [EMAIL PROTECTED] (Frank Christoph)
Resent-Date: Tue, 9 Sep 1997 09:53:12 +0100
To tell the truth, I'm not really sure what qualifies as a
combinator language, so opinions on this are welcome.
I think any abstract data type qualifies as a language (and vice
versa). This point of view is due to Goguen, Thatcher, Wagner, and
Wright (1977) in their paper on initial algebra semantics. I think
"domain-specific language" is just a new buzzword meaning ADT, which
is good, because ADTs are tremendously important.
Maps between ADTs (i.e. ML functors) are also useful. From the
language point of view, these are semantics-preserving translations.
If domain-specific languages are important, why not consider
translations between them.
Maps between ADTs also provide a nice basis for a module system, as
shown originally by Goguen. I'd like to see these ideas incorporated
into the Haskell module system, perhaps in a simplified form.
Kestrel, where I work, has a module system called Specware that's
built directly on maps between ADTs. There's a paper on our website
(http://www.kestrel.edu).
I think one can argue that any monad generates one, but there are
important instances which are not monads, for example Swierstra &
Duponcheel's deterministic error-correcting combinator parsers or
Hughes' pretty-printing combinators.
A monad internalizes an imperative language inside a functional
language. It's just an embedded interpreter. The simplest instance,
of which monads are an elaboration, is probably:
null-action : Action
seq-actions : Action * Action -> Action
write-char : Char -> Action
This "actions as values" approach dates back to:
* McCarthy's situation calculus (~1960)
* Algol 60's phrase/data distinction
(or Reynolds' reading of it?)
* Henderson's picture language (1980)
I do think there are some new ideas, but not many!
David