Hi Vincent,

Le dimanche 4 mars 2018 11:35:04 UTC+1, vdelecroix a écrit :
>
> Hi Eric, 
>
> I agree with Kwankyu and Simon: 
> - the global namespace is already bloated 
> - abbreviations should be avoided in most places in Sage 
>
>
Thanks for your feedback.
 

> And having the namespace modified at the time an object is created is by 
> far the worst solution. 
>
>
As I said in the reply to Kwankyu, I am also fully convinced of this.
 

> The following two alternatives would be fine 
>
> 1) using member functions (methods): ie v.div() instead of div(v) 
>
> 2) having a module containing all of your abbreviations so that 
> {{{ 
> sage: from sage.manifolds.operators import * 
> }}} 
> would give access to these abbreviations in the namespace. 


This is actually the case in the ticket: all the operators as functions are 
in a dedicated module, so that one can do
sage: from sage.manifolds.differentiable.operators import *

You might 
> want to import this module in the namespace as "manifolds" so that the 
> user can do 
> {{{ 
> sage: manifolds.div(v) 
> }}} 
> This is what was done to simplfy the global namespace with 
> sage.codings.codes_catalog. 
>

Thanks for the suggestion, but from the end user who wants to perform 
elementary vector calculus,  manifolds.div(v) looks even more complicated 
than v.div(). So maybe, we should stick with the postfix notation and ofter 
the possibility to 
import by hand the operators module.

Best regards,

Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to