6 ms·
Can you just imagine that? No this is not a plausible scenario.
by jacobriis 3y ago
Can you just imagine that?
No this is not a plausible scenario.
- Vecr 3y agoBecause you never write gotos? Many embedded and kernel programmers still do. I think it makes sense in general.
- williamcotton 3y agoIt is known as error handling. Some languages renamed the practice to try/catch. Others added a Result type.
- trealira 3y agoLikely you know this, and you're just being funny, but the try/catch statement is more like setjmp/longjmp in C. The Result type in Rust is syntactic sugar for integer return codes, returning early on errors, and tagged union structures. And where C programmers use goto statements, C++ programmers use destructors, and Rust programmers use the Drop trait. Walter Bright also says that nested procedures in D eliminate most use cases of goto for him. You can also always avoid goto, in C, but usually, either it has excessive if-statement nesting, it uses boolean flag variables in loop conditions, or it uses structures to create state machines, but these are usually just uglier and more error-prone than the equivalent version using goto. The same applies to avoiding break, continue, and early returns.
- dotps1 3y agoI mean, this stuff does happen. There is an old electric station near me that is used for various things sometimes. Some band was in there shooting a music video and bumped something and somehow the whole area started filling with water. Nobody could stop it. The government, the water company, everyone was struggling to figure out what to do, and they decided to call the old guy that used to work there. He was in his 90s but he told them how to fix everything.
- thebruce87m 3y ago> plausible scenario I’m not sure what you are calibrating against but I feel like the last 20 odd years are full absolute batshit crazy stuff that doesn’t make sense and this seems rather tame.
- hathawsh 3y agoI wouldn't dismiss that scenario. It seems plausible that the documentation is so extensive that it takes time and effort to answer some questions. It might be easier to just ask the authors, if they're still around.
- xcv123 3y ago> No this is not a plausible scenario. COBOL exists. Billions of lines of COBOL still in production today. The scenario is already happening now.