sexpressions, sexpr, sex!
Wed, 21 Jun 1995 09:25:53 +1000 (EST)
garth zenie <gpzF93@hamp.hampshire.edu> wrote:
> frank is arguing for the same thing that i am arguing for (and which i
> believe fare agrees with) - that there has to a well defined, simple,
> easily modifiable (during runtime) syntax with which to define the
> base language.
> frank says (and i agree with him) that sexprs are the best available
Functors are a common feature of more modern languages than Lisp.
ML, Haskell, Prolog etc all use them, even though they are called
different things and have different syntax. For example, in ML
you would define an s-expression type thus:
datatype sexp = Cons of sexp * sexp
| Atom of string
In Haskell it is:
data SExp = Cons SExp SExp
| Atom [Char]
In Prolog you might use:
:- type sexp ---> cons(sexp, sexp) ; atom(string).
I think that functors (or constructor functions, or structured types,
or whatever you want to call them) are so pervasive in modern languages
that it would be silly not to consider them (at least).
Just my opinion, and I'm prepared to be talked out of it if necessary.