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

Re: Aikido language

At 1:20 PM -0500 2/5/04, Johan Ovlinger wrote:
>Bryn Keller wrote:
>>In Nice (http://nice.sourceforge.net):
>>//In a library somewhere
>>class String {
>>  // methods
>>// in your code
>>String toUpperCase(String input) {
>>    // convert to upper case
>>This may look like a function, but it really is a method - you can 
>>specialize it for subclasses, you can use "regular" method syntax:
>I assume that there are scoping constructs so that two different 
>additions to String don't interfere with each other?

Of course, this has all been done in Lisp (CLOS) and Dylan.
Generic functions are what you use to extend functionality,
packages (or modules) are what you use to prevent clashes. (*)