Worth to mention in Octave 6 NEWS, support for private in namespaces?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Worth to mention in Octave 6 NEWS, support for private in namespaces?

José Abílio Matos
Hi,
        this is something that I notice when working with Octave 5 and
Octave 6. As I said in another message I am using a namespace:

+dir1/+dir2
+dir1/file1.m
+dir1/private/file2.m

The path has the location where +dir1 is but not +dir1.

The difference between Octave 5 and 6 is that file1 "knows" file2 in Octave 6
but not in Octave 5.

I suppose that it means that Octave 6 supports private in namespaces but
Octave 5. If that it is the case then I think that it would be worth to refer
this in NEWS.

What do you think?

Best regards,
--
José Matos



Reply | Threaded
Open this post in threaded view
|

Re: Worth to mention in Octave 6 NEWS, support for private in namespaces?

jbect
Le 29/04/2020 à 20:12, José Abílio Matos a écrit :

> this is something that I notice when working with Octave 5 and
> Octave 6. As I said in another message I am using a namespace:
>
> +dir1/+dir2
> +dir1/file1.m
> +dir1/private/file2.m
>
> The path has the location where +dir1 is but not +dir1.
>
> The difference between Octave 5 and 6 is that file1 "knows" file2 in Octave 6
> but not in Octave 5.
>
> I suppose that it means that Octave 6 supports private in namespaces but
> Octave 5. If that it is the case then I think that it would be worth to refer
> this in NEWS.
>
> What do you think?


Actually, I have even simpler (but related) questions:

1) Does Octave officially support these "namespaces" (directories
starting with a "+") ?

I know that the functionality has been implemented to some extent for
some time now, but I failed to locate any mention of this in the Release
Notes or in the manual.  Have I missed something ?

2) How are they called in Octave ?

The corresponding functionality in Matlab in called "package", but this
word refers to something entirely different in Octave...

@++
Julien


Reply | Threaded
Open this post in threaded view
|

Re: Worth to mention in Octave 6 NEWS, support for private in namespaces?

Mike Miller-4
On Wed, Apr 29, 2020 at 20:25:58 +0200, Julien Bect wrote:
> 1) Does Octave officially support these "namespaces" (directories starting
> with a "+") ?

Yes, since version 4.0. It was implemented as part of "classdef"
support, which was mentioned in the release news file.

> I know that the functionality has been implemented to some extent for some
> time now, but I failed to locate any mention of this in the Release Notes or
> in the manual.  Have I missed something ?

Lack of documentation is pretty common and unfortunate. For example,
"classdef" was only added to the user manual in version 4.4. Help with
the user manual is always appreciated.

> 2) How are they called in Octave ?
>
> The corresponding functionality in Matlab in called "package", but this word
> refers to something entirely different in Octave...

Yep. See "help import", where both "package" and "namespace" are used to
refer to the same thing. I prefer "namespace".

Cheers,

--
mike

signature.asc (849 bytes) Download Attachment