my old boss was an old and didn't really get this modern computing business. no exceptions, gotta declare all variables at the top of the function, only one return per function, I hated it and it's still messed me up a little
@BestGirlGrace one return per function? what do you do with ifs and cases? call something else to get the return?
@BestGirlGrace wow, being told off for Actually Programming Well
@jojo Right? I'd do the right thing, and he'd get mad and I wouldn't try to correct him because it was my first job
when I left, he told me to speak up for myself more???
@BestGirlGrace yes that’s actually bullshit and it’s not just you
programming language designers spent a lot of effort making early returns a safe thing to do
@riking Yeah, that's some ancient Fortran nonsense. Same with the "all variables declared at the top of the function".
@BestGirlGrace okay THAT one is literally stockholm syndrome
they got used to shitty compilers that couldn’t do their own damn variable layout and are now forcing those bad habits onto you
that's some ancient C compiler business, man. come on
@riking @BestGirlGrace oh and then the whole #pragma once vs. #ifndef thing, which I don't actually care about that much but I ended up writing this anyway: http://beesbuzz.biz/code/1473-pragma-once-vs-ifndef-define
@BestGirlGrace galaxy brain: use a kernel-style goto to jump to your one return at the end
@KitRedgrave goto fail time
Don't let the name fool you. All the pornography here is legal, and much of it is hand-written. No fascists, no bigots.