@monorail goto pizza is the name of a pizza restaurant owned by programmers isn't it
@The_T probably not; goto considered harmful :P
@monorail I'm never going to learn how to program~
@vaporeon_ @The_T @monorail hi vaporeon do you use GOTO
@wallhackio @The_T @monorail If I have any excuse to, then of course I do
Though that doesn't happen very often... And in my experience, if my code ends up having a lot of GOTOs, then that's because I am thinking wrongly about the logic and need to take a step back and find a better structure...
@vaporeon_ @The_T @monorail i was curious if you had any strong feeling about it
i've only used GOTO in TI-BASIC because the menu feature requires it, other than that i dont use it out of habit since people tend to discourage its use nowadays
@aschmitz @vaporeon_ @The_T @monorail C lets you jump between functions????
@wallhackio @aschmitz @monorail No, as far as I know? Unless you use setjmp()
/ longjmp()
, in which case the registers and such get saved in a jump buffer. But I've basically never had a need for setjmp()...
If I remember correctly, COBOL lets you just GOTO to a different function, though! I don't know how that's implemented, I've never actually programmed COBOL, I've only read about it...
@vaporeon_ @wallhackio @monorail Yeah, between functions is just in other languages, not C, sorry. (But yeah, more just "error handing is okay if you don't have better alternatives, limited forward use is less okay but can be understandable, and anything else you're just making spaghetti, unless it's the only flow control you have". I guess there are certain kernel-type constraints where it can be necessary too, though even there do it as little as feasible.)
@aschmitz @wallhackio @monorail May I ask which language you program in, that allows to GOTO between different functions?
I'm assuming it's something old, considering that most of the modern languages don't want to let you GOTO at all...
@aschmitz @vaporeon_ @The_T @monorail how are arguments from a function treated if you jump into it?