[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: s-exprs + prototypes
On Saturday, June 21, 2003, at 03:08 AM, Michael Vanier wrote:
> Your comment brings up a question that has been nagging at the back of
> my
> head for a while: are some language paradigms "more general" than
> others?
> If so, which are the "most general"? For instance, I *feel* as if the
> lisp/scheme language paradigm (essentially untyped lambda calculus) is
> "more general" than the single-dispatch OO paradigm at the heart of
> Smalltalk, but obviously both are equally powerful in a strict sense
> (you
> can write mappings between each of them and the other). So why do I
> feel
> this way? I guess it has to do with the fact that the receiver has a
> privileged status in ST, but one could argue that the first argument
> in an
> s-expression in scheme has a privileged status (it must be a procedure
> or
> special form). Or else it's that ST sort of locks you in to one object
> system, whereas scheme is agnostic. However, I could see arguments
> that
> (say) the paradigms in prolog or haskell are in some senses more
> general
> than those in scheme as well.
>
> Does this bother anyone else? Or do I just need to up my medication?
> ;-)
ST does lock you into a particular object system, but ST is a language,
not a paradigm. There are more general object models (such as
prototypes) that are more flexible than traditional class-based models.
OO != ST :-)
I see the OO paradigm of communication via messages between things that
encapsulate data as more general than lists. Everything is an object,
not everything is list.
LISP's use of a uniform representation of code(code as data) is very
elegant, but:
1. There's nothing to prevent an OO language from having such
uniformity.
2. Lists aren't the only choice for the base of a uniform system.
Why not use a tree as the unifying structure, for example? This would
seem more suitable since code is semantically a tree, not a list of
lists.
Cheers,
Steve