---------- Forwarded message ----------
From: Peter Doyle <[EMAIL PROTECTED]>
Date: Sep 20, 2007 9:04 AM
Subject: Re: [sage-devel] Regarding range and '..' operator
To: William Stein <[EMAIL PROTECTED]>


Hi William,

I am glad you have not abandoned your suggestion of introducing the
1..10 notation, which I think is absolutely brilliant.  I am new to
Python, and while I am not 100% keen on it, I do appreciate the clean,
simple syntax.  From long experience using computers in undergrad
courses, I understand that there are great benefits to being able to
tell at a glance what a (simple) program is supposed to do. Unless
programming is the subject of the course, there is no time to spare
for semicolons and underscores.  if I want students to be able to
modify existing programs, and write simple programs of their own, the
language has to be simple, in a way that Python mostly is.  If I'm
going to use SAGE in a probability course, it will be a huge advantage
to have this simple, crystal clear syntax for loops, conditionals,
function definitions.  Students are going to know at a glance how
simple demo programs work.  Except for the problem with range().  But
if I can write

for i in 1..10

instead of

for i in xrange(1,11)

then we'll be golden.  Well, until we crash into other peculiarities
of Python, like the way I can accidentally redefine the default value
of a list argument, or otherwise accidentally modifiy an argument
passed by reference.  But that's way down the road, and we'll likely
not run into that in a probability course or a calculus course.

Cheers,

Peter

Cheers,

Peter


-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to