Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67433 > unrolled thread

Re: why indentation should be part of the syntax

Started byNed Batchelder <ned@nedbatchelder.com>
First post2014-03-02 07:36 -0500
Last post2014-03-02 07:36 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: why indentation should be part of the syntax Ned Batchelder <ned@nedbatchelder.com> - 2014-03-02 07:36 -0500

#67433 — Re: why indentation should be part of the syntax

FromNed Batchelder <ned@nedbatchelder.com>
Date2014-03-02 07:36 -0500
SubjectRe: why indentation should be part of the syntax
Message-ID<mailman.7573.1393763808.18130.python-list@python.org>
On 3/2/14 5:41 AM, Stefan Behnel wrote:
> Haven't seen any mention of it on this list yet, but since it's such an
> obvious flaw in quite a number of programming languages, here's a good
> article on the recent security bug in iOS, which was due to accidentally
> duplicated code not actually being as indented as it looked:
>
> https://www.imperialviolet.org/2014/02/22/applebug.html
>
> Stefan
>

As much as I like indentation as syntax, and am amused by this bug, I'm 
not sure we can chalk it all up to space-vs-brace. After all, who would 
have wanted two goto's in a row even with braces?  It's not like there's 
some engineer at Apple who meant for the code to read like this:

     if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) {
         goto fail;
         goto fail;
     }

This looks to me like a poorly handled merge conflict maybe?  I wonder 
if we'll ever get the details.

-- 
Ned Batchelder, http://nedbatchelder.com

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web