From: Helmut Jarausch on
On 05/03/10 14:29, Chris Rebert wrote:
> On Mon, May 3, 2010 at 5:05 AM, Samuel Williams
> <space.ship.traveller(a)gmail.com> wrote:
>> Dear Friends,
>>
>> I'm looking for some help from the Python community. I hope this is the
>> right place to ask for information.
>>
>> I'm putting together a website aimed at high school students and teachers,
>> and would like to make sure the following page is as good as possible:
>> http://programming.dojo.net.nz/languages/python/index
>> In particular, "Why would I learn this language?" section needs to have a
>> few paragraphs. I don't use Python predominantly so I hoped that you could
>> provide the main reasons why Python is a language someone would want to
>> learn about.
>
> - Significant use in certain applications areas:
> * Web programming (common frameworks include Django & TurboGears)
> * Scientific and numerical computing (see SciPy and Numeric)
> - Large "batteries-included" standard library, with a large number of
> third-party libraries also available
> - Used by Industrial Light and Magic, Google/YouTube, and other big
> names (http://www.python.org/about/success/)
> - A very clean syntax and elegant design, compared to other languages
>

I've used Perl for quite some years before I switched to Python.
I've been burnt by Perl. There so many hidden variables and states
which influence the outcome of nearly each statement in Perl,
that it is hard to understand and debug unless you're using
it several hours a day (each day).

What convinced me is clearly written in
http://www.linuxjournal.com/article/3882

Please have a look at it,
Helmut.

(I'm teaching programming for more than 15 years)



--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
From: Terry Reedy on
On 5/3/2010 9:38 AM, Samuel Williams wrote:
> Dear Chris,
>
> Thanks for reading further into the site.
>
> Yes, it is complicated to provide a good comparison. It isn't always
> accurate and I welcome feedback.
>
> Please be aware that orange does not mean problem - it simply means
> take note that there may be potential issues that you need to
> consider. It is highly subjective, so I appreciate your feedback. The
> red dot is when there is definitely an issue that needs to be taken
> into consideration. It isn't "Okay, Warning, Error" because it isn't
> possible to make this kind of judgement without being omnipotent.
>
> There are several reason why I decided to rate the syntax as not
> being simple. 1) Indentation model is not appreciated by everyone - I

Appreciation is orthogonal to simplicity.

> think its a good model, but feedback from some other people has been
> that they don't like it. Also, I've had perfectly good Python code
> fall to bits after editing in a different editor. I'm not saying that

I view this is a consequence of simplicity. Python does not have the
complexity of usually redundant (but possibly contradictory) backup
indication of structure. So to me, you are rating Python as not simple
because it is too simple for some people for some purposes ;-).

> this was the fault of Python, but in an educational context it might
> be a problem, since people are fairly limited and don't understand
> these issues. 2) I don't think that the list comprehension integrates
> well with the rest of the language. It is an additional syntactic
> construct which seems to be separate from the rest of the language.
> It would be nice if list comprehension was implemented in a way that
> was more general, using a general closure syntax for example. This is

List comprehensions have been generalized in Python 3 to generator
expressions and list/set/dict comprehensions. I do not know whether you
rate Py2 or Py3 at your site, but for 'should I learn this language'
comparision, Py3 would be fairest.

> just my opinion, and it might not be valid (I don't research this
> point very heavily).
>
> I appreciate that in general the Python syntax is good and concise.
> It is hard. Some teacher might want to consider these issues more
> carefully. Do you think I should change that spot to green? I don't
> have a problem with doing that, as long as it makes sense.
>
> Thanks for providing the syntax images, they are very interesting.

I chose Python over Perl (over a decade ago) partly because it seemed to
me them to have a simpler, more consistent object model and system.
Since then, the user class system has been integrated with the builtin
type system, and the older separate class system eliminated in Python3,
which, again, simplifies things.

It is perhaps worth noting that Python's object model, and consequent
function calling protocol, dates back at least to Barbara Liskov's CLU
language.

Terry Jan Reedy

From: André on
To Samuel Williams: (and other interested ;-)

If you want to consider Python in education, I would encourage you
have a look at http://www.python.org/community/sigs/current/edu-sig/

I think you will find that there are quite a few resources available -
perhaps more than you are aware of.

And, I don't think that because "some people do not like the
indentation strategy" is a valid reason not to consider that Python's
syntax is concise and simple. Actually, I would almost argue for the
contrary. Indentation indicate programming structure/logic very
clearly, without the need for arbitrary keywords and other punctuation
symbols. There are very few keywords in the language.

You indicate that Python programs are readable. They are also known
to be short (much shorter than some other languages).
André
From: cjw on
On 03-May-10 09:38 AM, Samuel Williams wrote:
> Dear Chris,
>
> Thanks for reading further into the site.
>
> Yes, it is complicated to provide a good comparison. It isn't always accurate and I welcome feedback.
>
> Please be aware that orange does not mean problem - it simply means take note that there may be potential issues that you need to consider. It is highly subjective, so I appreciate your feedback. The red dot is when there is definitely an issue that needs to be taken into consideration. It isn't "Okay, Warning, Error" because it isn't possible to make this kind of judgement without being omnipotent.
>
> There are several reason why I decided to rate the syntax as not being simple.
> 1) Indentation model is not appreciated by everyone - I think its a good model, but feedback from some other people has been that they don't like it. Also, I've had perfectly good Python code fall to bits after editing in a different editor. I'm not saying that this was the fault of Python, but in an educational context it might be a problem, since people are fairly limited and don't understand these issues.

Nobody likes indentation at first, it is different. There is no
begin/end and not {}.

That feeling might last for an hour. People welcome the absence of
clutter. Indentation makes it easier to read and understand the code.

Coding errors are easily found with a good IDE, such as PyScripter

Colin W.

> 2) I don't think that the list comprehension integrates well with the rest of the language. It is an additional syntactic construct which seems to be separate from the rest of the language. It would be nice if list comprehension was implemented in a way that was more general, using a general closure syntax for example. This is just my opinion, and it might not be valid (I don't research this point very heavily).
>
> I appreciate that in general the Python syntax is good and concise. It is hard. Some teacher might want to consider these issues more carefully. Do you think I should change that spot to green? I don't have a problem with doing that, as long as it makes sense.
>
> Thanks for providing the syntax images, they are very interesting.
>
> With regards to Perl, yes, this is probably something I need to investigate further. It is not always easy to do a comparison of this nature. From my experience, Perl generally seems to have a robust object model that is consistently implemented (even if the syntax is pretty wonky at times). However, in a sense, it is no better or worse than Python implementation... so why is it green dot? Do you think I should change Perl to orange or Python to green.
>
> The main criteria is whether it is going to be an issue in an educational context - this means, for new programmers, or those who might make error easily (syntax, semantic), etc.
>
> Also, I wonder if Visual Basic needs to be reevaluated on this criteria too. I guess what is important is the relative importance.
>
> I will bring this issue up on the Perl mailing list in order to get advice.
>
> Would you recommend changing Perl to orange?
>
> Thanks for your well thought out response, it is very helpful.
>
> Kind regards,
> Samuel
>
> On 4/05/2010, at 1:06 AM, Chris Rebert wrote:
>
>> On Mon, May 3, 2010 at 5:29 AM, Chris Rebert<clp2(a)rebertia.com> wrote:
>>> On Mon, May 3, 2010 at 5:05 AM, Samuel Williams
>>> <space.ship.traveller(a)gmail.com> wrote:
>>>> Dear Friends,
>>>>
>>>> I'm looking for some help from the Python community. I hope this is the
>>>> right place to ask for information.
>>>>
>>>> I'm putting together a website aimed at high school students and teachers,
>>>> and would like to make sure the following page is as good as possible:
>>>> http://programming.dojo.net.nz/languages/python/index
>>>> In particular, "Why would I learn this language?" section needs to have a
>>>> few paragraphs. I don't use Python predominantly so I hoped that you could
>>>> provide the main reasons why Python is a language someone would want to
>>>> learn about.
>> <snip>
>>> - A very clean syntax and elegant design, compared to other languages
>>
>> Also, I take issue with your classifying Python as orange with regard
>> to "Is the general syntax simple and concise?" on
>> http://programming.dojo.net.nz/resources/programming-language-comparison/index
>> Python's syntax is at least as simple, if not simpler, than Ruby's,
>> which you rate as green. Ruby may be /slightly/ more concise than
>> Python in certain cases due to its Perl influences, but those
>> instances of specialized syntax also make it more complex.
>> To wit, I refer you to
>> http://webcache.googleusercontent.com/search?q=cache:dyugd_KlqvcJ:blog.nicksieger.com/articles/2006/10/27/visualization-of-rubys-grammar+ruby+grammar+visualization&cd=1&hl=en&ct=clnk&gl=us
>> Note the complexity of the graph for Ruby's grammar. By comparison,
>> here is the same graph for Python (generated from a file linked to in
>> the post's comment thread):
>> http://rebertia.com/images/python_grammar_graph.png
>> (Disclaimer: Neither of the graphs are current.)
>>
>> Additionally, you rate Python orange but Perl green for "Does the
>> language provide a useful and consistent set of object oriented
>> constructs?". Could you explain your reasoning for this? While neither
>> Python nor Perl have the level of object-oriented purity of Ruby or
>> Smalltalk, my understanding is that short of using CPAN libraries for
>> Perl or dealing in Perl 6, Perl and Python have a substantially
>> similar object model, so I don't how Python could rate below Perl in
>> this area.
>>
>> Cheers,
>> Chris
>> --
>> http://blog.rebertia.com
>

From: CM on

> Nobody likes indentation at first, it is different.  

For what it's worth, I didn't have a programming background, and I
liked Python's indentation right from the start. I was used to
thinking in terms of indentation from writing and word processing
documents with subordinate sections, so I found it very natural (and
already had a well-developed tab finger). On the other hand, curly
braces always have struck me as visual "clutter".