3 ms·
Oh, by "significant whitespace" I meant whitespace sensitive indentation, which I think Python and YAML are the only languages that has that feature.
by YuechenLi 1mo ago
Oh, by "significant whitespace" I meant whitespace sensitive indentation, which I think Python and YAML are the only languages that has that feature.
- rmunn 1mo agoF# as well.
- Chinjut 1mo agoHaskell, Lean, and Agda too. But even if Python were the only one, it wouldn't be weird to someone for whom this was their first programming language. It would just seem the way programming languages are. There's nothing intrinsically weird about indentation being significant. It's quite visibly part of the code you write and read.
- YuechenLi 1mo agoHmm. Learned something new today. Thanks.
- toast0 1mo ago> There's nothing intrinsically weird about indentation being significant. It's quite visibly part of the code you write and read. The idea is fine, I guess, although I certainly don't care for it. Where it gets most nasty is that whitespace that looks the same (in your editor) might not be equal and will cause you pain.
- xigoi 1mo ago> Where it gets most nasty is that whitespace that looks the same (in your editor) might not be equal and will cause you pain. This is why idiomatic Python only uses spaces for indentation.
- zahlman 1mo ago> Where it gets most nasty is that whitespace that looks the same (in your editor) might not be equal and will cause you pain. First off, what editor could I end up using in 2026 that makes this a realistic problem? Even the most basic editors I know of have options to convert tabs to spaces automatically (and any responsible teacher will tell the student to indent with spaces), and to continue the previous line's indentation automatically. Second, modern Python is stricter about this, and also gives clear error messages.