help-octave
[Top][All Lists]
Advanced

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

Re: namespace support?


From: Jaroslav Hajek
Subject: Re: namespace support?
Date: Thu, 4 Feb 2010 21:25:30 +0100

On Thu, Feb 4, 2010 at 9:05 PM, John W. Eaton <address@hidden> wrote:
> On  4-Feb-2010, Alexander Barth wrote:
>
> | On Sat, Jan 30, 2010 at 12:32 AM, Michael Goffioul
> | <address@hidden> wrote:
> | > On Fri, Jan 29, 2010 at 9:00 PM, John W. Eaton <address@hidden> wrote:
> | >> Or as a newfangled handle class (i.e., one of those object things
> | >> defined with classpath, which Octave does not yet have, and probably
> | >> will not have for quite some time unless someone comes along and works
> | >> on it)?  But then again, don't those things appear to be somehow
> | >> related to Java or even thinly disguised Java objects?
> | >
> | > That's what I meant. It looks like a Java class containing
> | > static methods.
> | >
> | > Michael.
> | >
> |
> | I made a test in matlab with the option -nojvm and I can still access
> | the netcdf functions. It seems that the namespace functionality is not
> | only for java objects.
> |
> | The matlab's netcdf interface is very close to the C netcdf library
> | (whereas the netcdf java inferface is at a higher level). I think it
> | would be preferable to implement the wrapper function for octave
> | directly in C++ (without java).
> |
> | The syntax "netcdf.function_call" could be simulated by creating a
> | netcdf object with a subsref dispatching to the appropriate function
> | call. However the netcdf namespace cannot be imported and this is not
> | a very elegant solution.
> |
> | Any better solution?
>
> Implement classdef-style classes in Octave.
>

It's simpler than that, I think. It appears that newest Matlab allows
prefixing some directories with "+", and
+mydir/myfun.m can then be called as "mydir.myfun". Maybe it wouldn't
be that hard to implement.
see
http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_oop/brfynt_-1.html#brf3g8k

regards

-- 
RNDr. Jaroslav Hajek, PhD
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]