octave-maintainers
[Top][All Lists]
Advanced

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

Re: Namespacing and directories under libinterp/


From: Max Brister
Subject: Re: Namespacing and directories under libinterp/
Date: Sat, 1 Jun 2013 12:35:24 -0500

On Fri, May 31, 2013 at 1:26 PM, Jordi Gutiérrez Hermoso <address@hidden> wrote:
On 31 May 2013 14:18, John W. Eaton <address@hidden> wrote:
> This reminds me of how we caved in to the pressure from some novice Octave
> developers and rearranged the Octave source tree last year.  The novices
> thought the number of files in the liboctave and src directories was
> intimidating.  And they assumed that it would be easier to see the structure
> of the sources if they were split up into more logical groups of functions.
> Since then, I've had nothing but trouble finding files. I don't think the
> extra directory levels in liboctave and libinterp really helped me at all,
> and they probably just make it more confusing for people -- WTF is the
> difference between libinterp/corefcn and libinterp/interp-core?

I think those are the only two where the distinction isn't clear. Or interpfcn.

I agree here, I think the interpfcn and interp-core directories should be gotten rid of and their files moved back under libinterp directly.
 
But I actually like the liboctave breakdown. And I like octave-value
and the parse tree classes in their own respective directories; those
are already de-facto namespaced by having ov- or pt- in front of the
source files.

If we create a namespace for Octave, it should be just one, and no
nested namespaces. octave:: seems fine to me.


In projects I have worked on in the past, there has been a one-to-one correspondence between directories and namespaces. I think this approach makes the most sense as I find it leads to minimal confusion while keeping names short. Part of the allure of  C++ namespaces is getting rid of the defacto C namespaces (e.g. octave_*).
 
- Jordi G. H.

--
Max Brister

reply via email to

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