Philosophical musings: interpreting models

Alaric Williams alaric@alaric-williams.com
Thu, 16 Sep 1999 11:12:31 +0100 (BST)


On Thu, 16 Sep 1999, Jim Little wrote:

> 1) How do you prevent multiple extensions from conflicting?

Basing the extensions on functions, which are (in various forms) fairly
universal to the three major paradigms with or without OO extensions, is
probably a good bet there.

> 2) Can you easily support entirely different paradigms?  E.g., can you
> extend an order-dependent imperative substrate with order-independent
> declarative constructs?

Yes. Clean does this well by expressing imperative execution in terms of a
purely function declarative base language and linear logic. To add logical
programming, I'd express the functional language in terms of a logic
language since the former is more restrictive.

So, we express the functional "concept" 'square x = x*x' as the logical
"concept":

square x result :- result = x*x.

(I think Prolog looked something like that).

> 3) What about entirely different kinds of syntax?  E.g., what if I
> wanted to extend the language to support path-following, and my
> preferred syntax was a line on a two-dimensional map?

FORTH does that quite well; it has strings implemented purely in the
standard library, even so far as the "quoted string syntax" for string
literals.

> Jim

ABW

---==========================[ http://www.alaric-williams.com/ ]============---

	Almost three thousand years ago, I was on the comittee
	who designed Christianity... but it took us nine hundred
	years to get it past the risk assessment subcomittee :-(

---=========[ alaric@alaric-williams.com ]==================================---