Language design

Antoon Pardon antoon.pardon at rece.vub.ac.be
Fri Sep 13 07:28:32 EDT 2013


Op 13-09-13 12:13, Steven D'Aprano schreef:
> On Fri, 13 Sep 2013 09:04:06 +0200, Antoon Pardon wrote:
> 
>> Op 10-09-13 12:20, Chris Angelico schreef:
>>> On Tue, Sep 10, 2013 at 4:09 PM, Steven D'Aprano <steve at pearwood.info>
>>> wrote:
>>>> What design mistakes, traps or gotchas do you think Python has?
>>>> Gotchas are not necessarily a bad thing, there may be good reasons for
>>>> it, but they're surprising.
>>>
>>> Significant indentation. It gets someone every day, it seems.
>>>
>>>
>> Not only that. There are a lot of python code snippets on the net that
>> for whatever reason lost their indentation. There is no algorithm that
>> can restore the lost structure.
> 
> Is there an algorithm that will restore the lost structure if you delete 
> all the braces from C source code?

Yes, almost. Just look at the indentation of the program and you will
probably be able to restore the braces in 99% of the programs.

> Perhaps if web sites and mail clients routinely deleted braces, we'd see 
> the broken-by-design software being fixed instead of blaming the language.

The world is not perfect. If products in your design are hard to repair
after some kind of hiccup, then I think the design can be blamed for
that. Good design is more than being ok when nothing goes wrong. Good
design is also about being recoverable when things do go wrong.

-- 
Antoon Pardon



More information about the Python-list mailing list