Leif and I had a discussion about this on #sagemath in October, but never 
brought it to sage-devel for some reason. Linked here as it may be 
relevant: http://boxen.math.washington.edu/home/keshav/files/irclog-var.txt

Basically, if we are already encouraging the syntax "var('x')" instead of 
"x = var('x')" (and William's post above seems to corroborate this), why 
not go even further and create something that actually looks like a type 
declaration with a statement, rather than a function, for example "symbolic 
x"? Compare to the "local x" and "global x" which already exist in plain 
Python. "symbolic x" would just be preparsed to "x = SR.var('x')", or 
similar. This seems to me much nicer and more Pythonic than messing around 
with globals. And for deprecation we could also preparse "^var\([^)]*\)$" 
to "symbolic whatever".

Nils Bruin wrote:
>For Keshav and injecting in "local" scope: Indeed, local scope is non-
>injectable. "global" scope varies, though: each module ("imported
>file") has its own globals dictionary. 

I see, thanks.

-Keshav

----
Join us in #sagemath on irc.freenode.net !

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to