News for hackers. Stuff that matters.
Re:Python 2 Removed from Debian by ahartmetz on Tuesday January 03, 2023 @02:48AM (#34228927)
Very strange, about the whitespace. I write C++ most of the time and I love significant whitespace. I like the combination of power and (...these days, relative...) simplicity of the language for all kinds of helper tools. Probably wouldn't want to use it to write something that is large and / or needs to run fast.
Re:Python 2 Removed from Debian by flask_manager on Tuesday January 03, 2023 @03:11AM (#34229081)
Ive always found whitespace to be like variable names, restriction coming from the language always seems to make it harder to use them to convey things to the next person who comes along.

The code typesetting is for the humans not the machines.

Re:Python 2 Removed from Debian by t43562 on Tuesday January 03, 2023 @04:11AM (#34229472)
The best thing about significant whitespace is the reduction in pernickety code review comments about it compared to other languages. If you also agree to "just run black" to format code then that kind of bullshit drops to almost 0 in a team.
Re:Python 2 Removed from Debian by majewsky on Tuesday January 03, 2023 @04:44AM (#34229651)
But if you agree on a certain formatting tool anyway, then you don't need significant whitespace to get that. That's one of the things I like most about Go. It shipped with gofmt from day one, so literally no one ever argues about coding style.
Re:Python 2 Removed from Debian by oefrha on Tuesday January 03, 2023 @05:20AM (#34229836)
People totally do argue about go coding style. Since gofmt doesn’t do line breaks, where to break long lines is a constant struggle. You also have stricter formatters like gofumpt addressing certain problems not handled by gofmt, but the long line problem is still up in the air AFAIK.
Re:Python 2 Removed from Debian by Attrecomet on Tuesday January 03, 2023 @06:31AM (#34230255)
The bad thing about significant whitespace is it breaks copy-pasteability of code, with no way to get broken formatting back without understanding what the code does.

That is a lot worse than formatting squabbles, especially for a glue language where you are expected to be able to copy snippets for short scripts all the time.

Re:Python 2 Removed from Debian by jacquesm on Tuesday January 03, 2023 @07:09AM (#34230478)
That and even with version control you will always have to keep an eye out for accidental deletion of the last bit of whitespace on any code block. It's a pretty easy mistake to overlook without context.