3 ms·
> But since Python syntax is arguably cleaner > and more readable, it's easier to catch. I've seen nasty bugs in Python code having to do with the end of b
by avar 13y ago
> But since Python syntax is arguably cleaner
> and more readable, it's easier to catch.
I've seen nasty bugs in Python code having to do with the end of blocks losing their indentation due to someone's merge/editor mistake.
Having braces or other explicit start/end markers for blocks would have prevented those issues. So Python's syntax can in some cases encourage these sorts of mistakes.
- yeukhon 13y agoYeah, that's an excellent point. I remember arguing with friends about this vs braces. Mis-indent error is also a hard-to-detect bug in general. Also, a joke from Python-dev: >>> from __future__ import braces
- isxek 13y agoThe __future__ may not be far off: Python with Braces (http://www.pythonb.org/ http://www.pythonb.org/).
- yeukhon 13y agoThis certainly is an underdog. Not that many people, probably just me, haven't heard of this yet. Interesting!
- bsder 13y agoPython with braces ... aka Javascript And I'm actually being serious. I program in both quite regularly. The Python ecosystem is amazing, but the web defaults to Javascript.