octave-maintainers
[Top][All Lists]
Advanced

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

Re: [octvae forge] shadowing between packages


From: JuanPi
Subject: Re: [octvae forge] shadowing between packages
Date: Mon, 18 Mar 2019 08:52:38 +0100

Hi Andrew,

The case is for geometry and matgeom, in particular function clipPolygon
(mercurial) https://sourceforge.net/p/octave/geometry/ci/default/tree/
(git) https://sourceforge.net/p/octave/matgeom/ci/master/tree/

> Doing namespaces dynamically is hard, because it means that you have to:
> a) rearrange the source files on disk to put them in a namespace before
> you add them to the path, and

I am already doing this anyway. For example I am erasing functions
that shadow core functions (e.g. deg2rad), so I could slightly change
this to put all these functions into a namespace.

> b) transform the code itself so function references now refer to the
> namespaced function, instead of the global non-namespaced one.

ok, based on my ignorance, I thought namespace would work as the
folder private. If global is the first scope where functions are
looked for, then namespaces offer no advantages (for this case) over
the order of loading the packages, i.e. load pkg A first then pkg B to
shadow functions in pkg A, and live with the consequences...
--
JuanPi Carbajal
https://goo.gl/ayiJzi

-----
“An article about computational result is advertising, not
scholarship. The actual scholarship is the full software environment,
code and data, that produced  the  result.”
- Buckheit and Donoho



reply via email to

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