3 ms·
Could you spend some effort to explain the reason then?
by spc476 3y ago
Could you spend some effort to explain the reason then?
- refulgentis 3y agoFwiw I've written some Real C++, think, audio encoders/decoders for voice recognition for 1B MAUs on the server, audio encoder on 2B devices. Each and every time there was just insane excuses that boiled down to only a few people wanted to write C++ and they found infinite ways to justify not doing things, like all us humans do. My favorite was the "don't write comments because as soon as you do they're out of date." Even though this is recognizably trollish tripe at the extreme it was implemented, I still find it hard to ignore that brainworm in my day to day coding.
- Retric 3y agoI think that’s a common mutation of the far more useful and therefore relevant “Don’t trust comments” which everyone learns at some point.
- citrin_ru 3y ago“Don’t trust people” is a heuristic to avoid being scammed. But it is much nicer to live in a society where you can trust most of the people. The same way it is nice to work with code base where you can trust comments by default. Which is the case for many open source projects.
- Retric 3y agoPersonally it’s always the programs you can generally trust that end up reinforcing the idea. On average you may be far better off trusting comments but that one time they fail you is all the worse because of that trust. It’s the same deal with compilers and computer hardware. They work so well that they become a blind spot, and yet I’ve had both fail me.
- dspillett 3y ago> My favorite was the "don't write comments because as soon as you do they're out of date." A better version of that is “if the code and comments disagree, there is a good chance that both are wrong”. If code and comments get out of sync, at best someone has been careless, and you need to be on the lookout for more carelessness in changes made at the time. At worst changes have been made without fully understanding what is going on, so there is a huge can of edge-case worms about to burst open.
- cesarb 3y agoThe reason is readability, not disk space or typing speed. When your screen resolution is 24 lines of 80 characters (a common screen resolution back when C became popular), having longer variable names means statements often have to be split over several lines, and less code fits on the screen at the same time. Even today, having shorter lines makes it easier to see several versions of the code side-by-side (for instance, when doing a merge, it's not unusual to see three versions of the code at the same time).
- p_l 3y agoThe reason was C compilers having little memory to work with thus limit of 6 characters for identifiers.