Are there some general guidelines on how to use the namespaces in
sage. Like: which function's should be accesible from which namespace
(global v.s. local and maybe some hierachical structure in the local
namespace).
I think some guidelines on this would improve the userfriendliness of
sage a big deal in the long run.
I personally find the polution of the global namespace and some local
namespace's to get already a bit annoying and making the [tab]
funtionality a whole less usefull then it could be for when quickly
trying to find some funtion.

Here are just some random ideas on what might be in these guidlines (I
don't claim them all to be good so be happy to comment at them, or
propose your own, or just shoot me ;))

1 A packege should, without a good reason (like almost every
mathematician need the package almost all of the time), not use more
then X names in the global namespace. (You could ofcourse do import
Foo to get more things in the global namespace when using a certain
package very heavely).

2 All functionallity related to a package should always be accessible
by Packagename.[tab] or Packagename.Subpackage.[tab] or
Packagename.Subpackage.SubSubPackage.[tab] e.t.c.

3 Names of Subpackages should start with a capitalized letter, while
names of atributes and functions should not (or any other convenient
way to make an easy distinction between packages and functions)

4 Maybe some guidelines to encourage nice hierachical namespace
design.

5 Some sort of template hierachy to make the user interface
(espesially the [tab]) in sage feel the same through all packages.

5.1 For example categorical constructions like (fibred) sum, (firbred)
product, etc occur in all area's of mathematics, and could be grouped
in PackageName.CategoricalStuff (sorry for the lame name).

5.2 Another one is to make all object initialisation commands
available through something like PackageName.Init.  using the current
graph implementation this addition would make the following two
statements equivalent
sage: graphs.CompleteGraph(6)
sage: Graph.Init.CompleteGraph(6)

Hope you don't mind the long tekst.
Maarten
On Nov 30, 11:11 pm, mabshoff <[EMAIL PROTECTED]> wrote:
> <SNIP>
>
>
>
> > I really like
>
> >   sage: finance.[tab]
>
> > I don't like explicitly forcing people to import stuff before they can use 
> > it
> > at all.  Thus I much prefer
>
> > $ sage
> > ....
> > sage: finance.[tab]
>
> > and I don't like
>
> > $ sage
> > ...
> > sage: import sage.finance as finance
> > sage: finace.[tab]
>
> > I do like various domains with lots of functions to have their
> > functionality gathered together under
> > a namespace.     That said, I'm not for some massive reorganization of
> > the current global namespace, since that wold break a huge amount of
> > existing code -- both in Sage and out (e.g., the examples at
> > wiki.sagemath.org/interact).
>
> > And it's not the end of the world that len(globals()) is large.  It's
> > only a problem to me when there are specific reasons it is a problem.
>
> >    -- William
>
> Ok, that is pretty much what I wanted to express, i.e. having most
> things of a given subsystem gathered under $SUBSYSTEM.[tab]. I did not
> mean that one would have to import things, so my use of "global
> namespace" was not in the pythonic way.
>
> Cheers,
>
> Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to