[Python-ideas] Simpler syntax for basic iterations

Rustom Mody rustompmody at gmail.com
Mon Oct 12 07:37:43 CEST 2015


On Mon, Oct 12, 2015 at 10:28 AM, Luciano Ramalho <luciano at ramalho.org>
wrote:

> On Mon, Oct 12, 2015 at 1:43 AM, Guido van Rossum <guido at python.org>
> wrote:
> > Well, that's even more limited.
>
> Yep. That's the whole point.
>
>

In discussions like this there are 3 – at least – interlocking parties with
their conflicting interests.

   1. Professional programmers
   2. Language Designers/implementers
   3. Programming/CS teachers

It is unlikely to find people equal to all these but at least let us be
clear that these 3 exist!

[For those who find this too long, tl;dr at bottom ]

To see that these viewpoints are inherently conflicting consider that a
programmer may wish that his language precludes errors – a natural wish.
Translated to the designer camp this means an automatic detection of errors
– also known as the Halting Problem. Which is to show that the programmer's
and the language-designer's needs are not just conflicting, they are
inherently conflicting

And so, in like manner the programming-teachers' needs are in inherent
conflict with the needs of professional programmers and language designers.

3-4 decades ago this was widely understood and some sort of compromise was
worked out: Beginners studied Pascal (or Basic); professionals lived inside
Fortran, Cobol, PL-1 etc.

With the coming of C, people began to imagine that C was sufficiently close
to Pascal that a one-fit-all solution was possible. The result has
been terribly
detrimental
<http://blog.languager.org/2013/02/c-in-education-and-software-engineering.html>
to CS-edcuation

The increasing widespreadness of languages like Python and Haskell may seem
to improve this situation. IMHO it only worsens it: Sure Python is better
to teach than C++ but its not better enough that its suitable as a
teaching-language. [And as Haskell gallops towards Real-World
<http://book.realworldhaskell.org/> status it also gallops towards
C++-dom].

Specifically coming to the suggestion at hand: Pascal got one thing right
that all its successors, starting C, got terribly wrong: the need to
separate and *do equal justice to*
Platonic world Mundane World Values Effects Expressions Statements functions
procedures

More about this 50 year-old error and a beginning gleam of light:  a  ACM
CS Curriculum 2013
<http://blog.languager.org/2015/06/functional-programming-moving-target.html>
and its prequel Timeline
<http://blog.languager.org/2015/04/cs-history-1.html>

The error of imagining imperative programming is easy to learn comes from
people not seeing that imperative languages *as they exist* contain a
subset functional language which is ineluctable. Also known as the rhs of
assignment statements – with the '=' being the visible indicator of
the infamous
von Neumann bottleneck
<https://www.cs.cmu.edu/%7Ecrary/819-f09/Backus78.pdf>.

The functional programming folks seeing this error try to expand that
expression world to cover all of programming needs. [Whether the results of
these good-intentions eg Haskell are more teachable is another matter!]

The alternative (eg Logo and I am guessing Luciano and Andre ) that for the
'atoms' of the statement world, instead of having assignment statements to
have turtle-left/right etc. This renders the language useless for general
purpose programming but can be a neat intro to algorithmic thinking


tl;dr

   1. Language designer/implementers may wish to ask themselves whether
   having a family of easily learnable but slightly inconsistent languages
   helps or hinders their language.
   2. Teachers may wish to re-evaluate their fixed-cost/variable-cost
   (equivalently batch/interactive cost) outlay in the languages they teach
   and check whether implementing a cut-down subset of their chosen language
   doesn't speed up their students and themselves
   3. General programmers need to remember – not only were they noobs at
   some stage, there is probably something they are learning right now to
   which noob-ness applies even to them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20151012/a2e209ff/attachment-0001.html>


More information about the Python-ideas mailing list