in reply to Evolution of python

Could a future version of Python finally adopt parenthesis braces? Do people have thoughts on that? I don't really understand why Python would ultimately not want to use parenthesise braces.
Python began its life as a language for teaching of programming concepts. However, curlies aren't a concept themselves, they usually stand in for the concept of a block. Now, when blocks are written with curlies, it is very easy (especially for beginners) to misindent them, which makes it very easy (especially for beginners) to misinterpret the structure of the program. For this reason GvR chose indentation to denote blocks, which makes curlies unnecessary (and unwanted, because otherwise you'd have to set the curlies properly and correctly indent anyway)

As soon as automatic prettyprinting / automatic aligning becomes mandatory (or even common), Python could go "back" to curlies. However, most programming languages are "free-form", so mandatory tidying might be seen as a step backwards. So, don't hold your breath for that to happen.

Replies are listed 'Best First'.
Re^2: Evolution of python
by betmatt (Scribe) on Jul 09, 2019 at 12:02 UTC
    It is so easy to press a tab key in an editor like Emacs to align the code correctly. In fact I actually enjoy that aspect of the coding process. The braces used in Perl help in viewing the code. There may be a tendency for Perl however to encourage a degree of nesting that would not be normal in Python. Has the development and use of functions and classes in Python been influenced by this? Was this a consideration when Python was first designed?

    The reason why I think that this is worth asking as a question: Maybe Perl designers need to consider whether some design rather than evolution is required on this aspect. I am not saying that Perl or Python is better, just that the issue is worth considering.