octave-maintainers
[Top][All Lists]
Advanced

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

Re: FYI: subasgn argument optimization


From: Jaroslav Hajek
Subject: Re: FYI: subasgn argument optimization
Date: Fri, 14 Aug 2009 19:05:45 +0200

On Fri, Aug 14, 2009 at 5:39 PM, John W. Eaton<address@hidden> wrote:
> On 13-Aug-2009, Jaroslav Hajek wrote:
>
> | PS. This patch rebases octave_class on top of octave_struct.
>
> It seems that would be a good thing.  I can no longer remember why
> I didn't do it originally.  I don't think I would have avoided
> inheritance unless I had a reason, but then maybe I didn't realize how
> similar classes were to structs.
>
> | The way field
> | references should work for ancestor classes is still somewhat of a
> | mystery to me. I'd appreciate comments and suggestions from John or
> | anyone interested.
>
> If you are asking for specific comments or suggestions about ancestor
> classes, then I probably don't understand the way things are supposed
> to work any better than you.  I think I would need specific questions
> with examples.
>

OK, here are some:

* A class is constructed from a struct. Can the struct be
multidimensional? (if the answer is no, then there is no need to read
further).
* Ancestor class is represented by a special field. If the struct is
multidimensional, what about this field?
* When an inherited method is called for an object, the inherited
method is called with the whole object, not just with the parent
subobject; field references are automatically forwarded to the proper
parent subobject. But what happens, for instance, if a multi-dim class
object is indexed just with ()?

I will try to read some Matlab docs and answer myself. I think the
most sensible approach is just to not allow multi-dim classes; I don't
see much use for it anyway.

regards

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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