octave-maintainers
[Top][All Lists]
Advanced

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

Re: do you have classdef files?


From: John W. Eaton
Subject: Re: do you have classdef files?
Date: Thu, 13 Jan 2011 19:35:17 -0500

On 13-Jan-2011, Ben Abbott wrote:

| On Jan 13, 2011, at 3:11 PM, David Grundberg wrote:
| 
| > Ben Abbott skrev:
| >> On Jan 12, 2011, at 12:58 PM, David Grundberg wrote:
| >> 
| >>> Hi,
| >>> 
| >>> I'm that guy that improved nested function parsing.
| >>> 
| >>> I'm going to look at improving the classdef parsing and interpreting.
| >>> I'm sorely missing files to test on, so if you happen to know any free
| >>> software packages implemented in classdef-style, please let me know.
| >>> Any size or shape is OK, as long as it runs.  I don't have access to
| >>> Matlab so I will be using my matlab-fu to figure out how it works.
| >>> 
| >>> Grundberg
| >> 
| >> Are you planning to implement handle classes?
| >> 
| >>    classdef some_handle_class < hgsetget
| >>    ...
| >>    ...
| >>    ...
| >>    end
| >> 
| >> Ben
| > 
| > Even though I don't approve of the way they designed the "handle
| > functionality" as a superclass (just don't get me started), I guess it's
| > on the road map.  This won't be done tomorrow.  I'm just saying I'm
| > going to try to move this thing, well, somewhere.
| > 
| > Notice that Matlab only allows handle functionality on classdef classes,
| > AFAIK.
| 
| That is my understanding as well.
| 
| > Also we need a name to separate legacy style classes from classdef ones.
| > I don't think I'll be able to stick the classdef system on top of the
| > existing one because, well, it's hairy.  But definitely a bonus if possible.
| 
| I'm entirely unfamiliar with how the existing one is implemented. However,
| I'm no fan of the @classname directories and that lack of handles.
| 
| If you go with the "bonus" approach, I'd be please to see the legacy style
| support handles. This would, for example, allow me to write an inputParser
| object for Octave.

I'd rather not do anything with the @classname directories than is
absolutely necessary to make existing Matlab code work.

For classdef, it seems to me the simplest thing would be to make value
classes work first since we already have value classes working, just
with a different way of defining them, and (I think) some slightly
different semantics.  We need to be able to deal with the case of a
single file containing the entire class definition, and the case of
multiple files in an @classname directory (but using classdef in the
constructor function file, I think).

Once that is mostly working, it seems like it would make sense to move
on to the more complicated case of handle classes.

jwe


reply via email to

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