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

Re: Aikido language




On 5 Feb 2004, at 10:20, 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:
>> "hello".toUpperCase();
>
> I assume that there are scoping constructs so that two different 
> additions to String don't interfere with each other?
>
>
>

Hi Bryn,

If you are referring to Aikido...

If the program attempts to extend a class by adding two functions of 
the same name, the
parser will detect this and an error will be generated.  The 'extend' 
keyword puts you
in the scope you are extending.

Does that answer your question?

Dave