[Edu-sig] Why Python?

David MacQuigg macquigg at ece.arizona.edu
Mon Apr 12 01:50:34 CEST 2010


Edward Cherlin wrote:
> On Sat, Apr 10, 2010 at 09:33, Christian Mascher
> <christian.mascher at gmx.de> wrote:
>   
>> Edward Cherlin wrote:
>>     
>>> [sigh]
>>>
>>> Do math tables in a math array language.
>>>
>>> degrees =. i. 91  NB. 0..90
>>>
>>> radians =. degrees * o. % 180
>>>
>>> table =. |: degrees, 1 2 3 o./ radians
>>>       

<snip>

>> Python is much nearer to standard Math-notation, that is a good thing.
>>     
>
> LOL. Math notation is what mathematicians use, not schoolchildren.
> They are constantly inventing more of it. What you call math notation
> is known to mathematicians as "arithmetic".
>
> There is no standard math notation.
>   

I think what Christian means to say is that Python is much nearer to a 
notation (pseudocode) that might be used by scientists and engineers who 
are trying to express an idea involving computation, without relying on 
a specific language.  Of course, there is no "standard" pseudocode, but 
if you look at textbooks that are most successful at expressing 
algorithms this way (my examples would be from engineering - Hachtel & 
Somenzi on Logic Synthesis, Stinson on Cryptography) what you see is a 
notation very close to Python.

Pseudocode has to be self-explanatory.  There is no introductory chapter 
on how to read it.  Likewise, an introductory computer language should 
be close to self-explanatory.  It will be difficult to get math and 
science teachers to accept it, if they have to make extra efforts 
explaining the notation.  Getting math and science teachers to accept 
computation as a vital part of their curricula is my current focus, so I 
wouldn't try to push something like your example above.

Python is just a means to an end, the closest thing we have to 
pseudocode.  When someone who favors another language (typically Java) 
asks me why Python, I find the comparison to pseudocode to be the best 
answer.  Specific examples, like the absence of type declarations, tends 
to invite unthinking reactions.  (Students will make too many errors.)  
Even something as simple as requiring correct indentation is not obvious 
to someone who hasn't used Python.  (Although that one does have some 
appeal to teachers who have had to read sloppy student code.)  
Ultimately, it is word-of-mouth, one teacher telling another, that I 
think will decide which language gets used.

-- Dave

************************************************************     *
* David MacQuigg, PhD    email: macquigg at ece.arizona.edu   *  *
* Research Associate                phone: USA 520-721-4583   *  *  *
* ECE Department, University of Arizona                       *  *  *
*                                 9320 East Mikelyn Lane       * * *
* http://purl.net/macquigg        Tucson, Arizona 85710          *
************************************************************     *




More information about the Edu-sig mailing list