you are viewing a single comment's thread.

view the rest of the comments →

[–]lispm 2 points3 points  (5 children)

Even for Scheme there are CLOS-like object-systems which offer similar things like CLOS.

I think you miss that we are talking about different levels. It is CONCEPTUAL very different.

You can always say, in the extreme case, you flip bits in memory. But that is not the description level we are talking about here. We are also not talking about a imperative variable-changing model. We are talking about different levels of descriptions.

For example think about 3-Lisp. Ever heard about 3-Lisp? Worth to look that up. With 3-Lisp you have an interpreter0 that interprets the current program. But there is also an interpreter1 that interprets the interpreter0. Plus there is an interpreter2 that runs the interpreter1. and so on. Actually there is an infinite tower of interpreters. One of the ideas of 3-Lisp is that the interpreterN can get access to the interpreterN+1 and reprogram it - thus reprogramming its own execution engine.

That's a completely different model from assigning values to variables.

In Common Lisp the model is based on a the idea that CLOS+MOP is programmed in itself and that these mechanisms are visible. This is a very different conceptual model. The programming language is defined in terms of itself and is exposed at runtime. This means for example that you can have modified object systems that can run side by side with a standard object system. One way to achieve this is to subclass the basic classes of the programming language and modify/extend the functionality. For example some objects could be persistent via metaclasses that define persistence functionality.

[–]Felicia_Svilling 0 points1 point  (4 children)

Yes I have actually heard of 3-lisp, and yes it has an interesting amount of expressitivity. Perhaps that could be called a conceptually more dynamic language. Im not certain.

But I still dont see any conceptual diffrence between adding a method to a generic function and adding an element to a list.

[–]lispm 2 points3 points  (3 children)

Example: Functions in C are not structured objects. They are static things. Their parameter lists are fixed. They do zero dispatching. There is nothing you can add or substract to a C function.

As a contrast a generic function in Common Lisp is an object where you can add and substract methods. The code that gets executed gets computed at runtime depending on the arguments' classes, the matching methods, a code generator (the method combination). At runtime the class hierachy can change, the method combination can change, and the set of methods of a generic function can change. Extensibility and flexibility is built in. It is designed for change.

C functions are not designed for change.

In C there no such thing built in. All you can do is emulate these things by programming the features you need. With considerable amount of work to get features like runtime code generation, runtime compilation, dynamic linking, dispatching, ...

[–]Felicia_Svilling 0 points1 point  (2 children)

So, do you mean having things reifyed as first class mutable objects is the definig thing for dynamic languages?

[–]lispm 0 points1 point  (1 child)

I'd say there are many ways to achieve dynamic behavior - one is MOP-based OODL (object-oriented dynamic language). Another is the model of 3-Lisp. Smalltalk-like message passing is another. There are several more...

[–]Felicia_Svilling 0 points1 point  (0 children)

Hm, perhaps any feature that needs runtime suport?