On Thu, Apr 10, 2008 at 3:55 AM, Stéfan van der Walt <[EMAIL PROTECTED]>
wrote:

> Hi Joe, all
>
> On 10/04/2008, Joe Harrington <[EMAIL PROTECTED]> wrote:
> > > Absolutely.  Let's please standardize on:
> >  > import numpy as np
> >  > import scipy as sp
> >
> >  I hope we do NOT standardize on these abbreviations.  While a few may
> >  have discussed it at a sprint, it hasn't seen broad discussion


Valid point... Travis did a wonderful job of summarizing that sprint and
posting to the list.  However, the N vs. np discussion was missed.

http://projects.scipy.org/pipermail/scipy-dev/2007-December/008078.html


> Namespaces throttle the amount of information with which the user is
> presented, and well thought through design leads to logical, intuitive
> segmentation of functionality.
>
> >  Namespaces add characters to code that have a high redundancy factor.
> >  This means they pollute code, make it slow and inaccurate to read, and
> >  making learning harder.  Lines get longer and may wrap if they contain
> >  several calls.  It is harder while visually scanning code to
> >  distinguish the function name if it's adjacent to a bunch of other
> >  text, particularly if that text appears commonly in the nearby code.


I think namespaces are one of the crown-jewels that make python more
attractive to scientists (not programmers) over Matlab.  Even if they don't
realize it yet.  :)

I think a lot of researchers would spend less time debugging their code if
they were using python with namespaces instead of adding this:

addpath(genpath('mydirectory'))

in all of their Matlab code!  Or other path manipulation.

We certainly need a better discover mechanism for users to find functions
however.

-- 
Christopher Burns
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
phone: 510.643.4014
http://cirl.berkeley.edu/
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to