help-octave
[Top][All Lists]
Advanced

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

Re: OO in octave.


From: ernst
Subject: Re: OO in octave.
Date: Thu, 31 Jan 2013 01:13:28 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120825 Thunderbird/15.0

Hi Sergei,
>
>
>
> ----- Original Message -----
>> From: ernst <address@hidden>
>> To: address@hidden
>> Cc: 
>> Sent: Thursday, January 31, 2013 1:09 AM
>> Subject: OO in octave.
>>
>> Hi all,
>> i know OO from java: x.function(a,....) means function(x,a,...)
>> where the class of x determines the choice of the function.
>>
>> For octave i did not find an according statement in the docu.
>> Does octave rely on the 1st argument only, as java does or does it look
>> after all?
>>
>> greetings, Ernst
> If you need only
>
> x.function(a,....) means function(x,a,...)
>
> then OO is just syntax sugar you do not really need.
>
> If you need inheritance and polymorphism, then you need OO.
>
> But Octave essentially supports polymorphism. Even UNIX/Linux 'ls' command 
> (and many others) are polymorphic functions.
>
> Regards,
>   Sergei.

Well, I need. inheritance and polymorphism.. yes that's what i meant by
"where the class of x determines the choice of the function.'

I just wondered, whether octave checks for the first argument only.
And i was confused, that i did nowhere in the docu find a word about the
search mechanism.
Something like:
"If the first argument arg1 has class <cls> (determined by function
class(arg1)),
then the function definition is searched for in folder @<cls> and
subfolders recursively. "

Is this the truth?

Also it seems to me as if only member methods are supported. Right?

regards,

Ernst
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]