[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: s-exprs + prototypes
On Sunday, June 22, 2003, at 12:42 AM, Anton van Straaten wrote:
> I'd be more impressed if you could expose the function-like constructs
> in the implementation of methods, without having to create objects
> with an
> apply method.
But functions and methods *are* implemented as objects with an apply
> Still, this has two related features that I like better than what I've
> hearing here: first, the functionality of standalone functions, with
> closures, is provided as a standard part of the language, making
> at least dual-paradigm; and second, methods and functions are
> implemented by
> the same construct, i.e. there isn't some inaccessible internal method
> construct which has to be built on top of in order to create something
> like a function.
Really I see this as 6 of one, half a dozen of the other.
Functions are objects and objects are functions. What is the difference?
Smalltalk has standalone closures provided as a standard part of the
language. So do many OO languages.
hide their implementation.
You can access things as data or method. Objects should just be
behaviour. Distinguishing between obj.thing and obj.thing() is a non
starter for me. The feature you argue for is exactly what I don't want.
If you have to make that distinction then you can't put 'thing' as data
in one object and as a method in another object and use those two
If I want a language that can implement any paradigm, then I'll choose
C not Lisp.
--- james mccartney email@example.com <http://www.audiosynth.com>
SuperCollider - a real time audio synthesis programming language for