Hi there,
I know I'm a week late with this but as I'm part of the 5% Python programmers
using SAGE and just realized that I dislike the namespace injection thing I
speak up anyway:
The global namespace injection breaks both functional so as object-oriented
paradigms. Functional: A result of a computation in a function does only
depend on the inputs to this function. OO: methods either modify self or
return something like a function.
I do understand why people like the idea of global namespace injection still I
think it's something CS people (=me) will have trouble to relate to. I
realized it just now because I wrote a little function which takes a string
and returns a bunch of Maxima elements (=variables) like this:
sage: x,y,z = symbolic("x,y,z")
sage. f = cos(x)*sin(y)
sage: integral(f,z) ...
The analogous, consistent behavior to the polynomial ring namespace injection
would be:
sage: symbolic("x,y,z") #no return (necessary)
sage. f = cos(x)*sin(y)
sage: integral(f,z) ...
which makes me feel uneasy. Not only because of the mysteriously appearing
variables but also because prior assignments are overwritten: Implicit
effects on unrelated objects.
It's probably just me.
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_icq: 177334829
_jab: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---