Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Python with braces. Because Python is awesome, but whitespace is awful (github.com/mathialo)
7 points by behnamoh on June 3, 2022 | hide | past | favorite | 6 comments


The whitespace thing was the first thing I hated about Python. I would still hate Python with braces.


I really wish we could go back in time to 1991 and convince guido to include braces like this.


Even in languages with braces, folks will still use whitespaces for readability. Like, the examples on this repo's README do have whitespaces.

So... what's the point of using braces?


I wish we could remove braces from a lot of the new languages. Having a lot of symbols like {:abc:} or whatever might make parsing convenient, but it doesn't make typing, readability, or searching more convenient. Most search engines will strip out symbols and just look for words.

When I first started with Python I though using white space to show structure was crazy. After using it for 13 years, I don't want to go back to typing what appears to me to be useless braces. Have I ever had a problem due to a misindent? Yeah, a couple of times. I've had that problem with braces too, about the same number of times.


Does it override this?

  from __future__ import braces


"whitespace is awful, but braces are infinitely worse"

FTFY

IMO the spaces and lack of braces is one of the best things about Python.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: