[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: s-exprs + prototypes





On Saturday, June 21, 2003, at 07:16 PM, Anton van Straaten wrote:

> To repeat myself, "if a language requires you to express everything in 
> terms
> of class-based objects, or prototype-based objects, that's less 
> general than
> a language which makes fewer assumptions about what types of objects 
> (or
> other construct) you want to use, and how they should work."

But Lisp also makes an assumption about how things should work and IMO 
it is less general.

Consider that an object can be thought of as a function and a selector 
is its argument. Now lets say that you write a macro to define objects 
that have only one method 'apply' and you can elide that from the 
argument list.
Now you have Lisp.
Remove that restriction and you have polymorphic objects. So which is 
more general?
So with my virtual machine you should be able to implement something 
like Lisp in a single macro.
In Lisp it would take some work to implement prototype inheritance.


-- 
--- james mccartney   james@audiosynth.com   <http://www.audiosynth.com>
SuperCollider - a real time audio synthesis programming language for 
MacOS X.