4 ms·
I just put 'pass' at the end of each block... Emacs could actually do proper auto-indenting then.
by silon42 6y ago
I just put 'pass' at the end of each block... Emacs could actually do proper auto-indenting then.
- Gibbon1 6y agoThing I know from implementing simple line protocols. Pythons encoding just blows. Languages with defined begin and end tokens are better.
- Riverheart 6y agoDumb question, what's the use case for a line protocol?
- Gibbon1 6y agoJust stupid serial protocols to talk between devices. Often you have problems with picking commands and responses out of noise and or garbage. Think half duplex RS485. Protocols that use one token for delineating messages have poor error recovery/synchronization. I think pythons grammar is rather poor as a result. Other languages are far better. It's important because it effects tooling because tooling often has to deal with broken input.
- arc-in-space 6y agoEh, I wouldn't assign that too much importance. Most C/C++ tooling practically gives up on a missing closing brace and almost never gives the right error message.
- Gibbon1 6y agoC and vastly more so C++ have a lot of other problems. C compilers can give the right error message 95% of the. But They have an excuse since they are older languages. Python was developed in an era when people knew better. Java and C# are examples of well designed grammars. Tooling was a first class requirement for C# and it shows. Where python will never have great tooling.
- nisse72 6y agohaha yes I wish emacs could do that too but the thought of a redundant pass in every block would probably bother me more than the lack of auto-outdent. That colon that starts every indented block is like an unmatched opening brace though.