Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you just imagine that?

No this is not a plausible scenario.



> 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.


I 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.


I would love to read the full story on this.


If it doesn’t end up with an itemised bill of $1 to turn off a stopcock and $999 to know where it is, I’d be disappointed.


I 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.


> No this is not a plausible scenario.

COBOL exists. Billions of lines of COBOL still in production today. The scenario is already happening now.


Because you never write gotos? Many embedded and kernel programmers still do. I think it makes sense in general.


It is known as error handling. Some languages renamed the practice to try/catch. Others added a Result type.


Likely 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: