Teaching Programming
Ed Keith
e_d_k at yahoo.com
Tue May 4 11:14:57 EDT 2010
--- On Tue, 5/4/10, Andre Engels <andreengels at gmail.com> wrote:
> From: Andre Engels <andreengels at gmail.com>
> Subject: Re: Teaching Programming
> To: "James Mills" <prologic at shortcircuit.net.au>
> Cc: "python list" <python-list at python.org>
> Date: Tuesday, May 4, 2010, 11:00 AM
> On Tue, May 4, 2010 at 4:35 PM, James
> Mills
> <prologic at shortcircuit.net.au>
> wrote:
> > On Wed, May 5, 2010 at 12:21 AM, Ed Keith <e_d_k at yahoo.com>
> wrote:
> >> To deal with indentation I had to
> >>
> >> 1) keep track of indentation of all chunks of
> code embedded in the
> >> document and indent inserted chunks to the
> sum of all the
> >> indentation of the enclosing chunks.
> >
> > In my experience of non-indentation sensitive
> languages
> > such as C-class (curly braces) it's just as hard to
> keep track
> > of opening and closing braces.
>
> Although I have little or no experience with this, I still
> dare to say
> that I don't agree. The difference is that in C you do not
> _need_ to
> know where in the braces-defined hierarchy you are. You
> just embed or
> change a piece of code at the right location. In Python
> however you
> _do_ need to know how far your code is to be indented.
>
>
For a programmer, it is harder to keep track of braced.
For a code generator, it is harder to keep track of indentation.
It is a matter of which you are more interested in catering to. Python is easier to write, C is easier to generate.
-EdK
Ed Keith
e_d_k at yahoo.com
Blog: edkeith.blogspot.com
More information about the Python-list
mailing list