Programming thread

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
1766880749669.png
Me the last 2 weeks
 
How raw? Just jumping to a label in the same function? Jumping to arbitrary labels? Jumping to arbitrary memory addresses?
c++ goto doesn't let you jump outside the current function
pretty sensible limitation imo, i don't even know how you would do goto in and out of random functions without mangling the call stack in the process
 
c++ goto doesn't let you jump outside the current function
pretty sensible limitation imo, i don't even know how you would do goto in and out of random functions without mangling the call stack in the process
That's what longjmp is for.
Also, longjmp-ing out of an interrupt handler is fun.
 
task scheduling is a spook
 
Forward only typically. I've been finding that it helps with code reuse and removing branches.
Yeah, that I personally wouldn't call rawdogging gotos.

Forward jump only goto's are perfectly fine, in most cases, IMO. Backwards jumping or jumping across functions is where they get impossible to reason about.
 
Yeah, that I personally wouldn't call rawdogging gotos.

Forward jump only goto's are perfectly fine, in most cases, IMO. Backwards jumping or jumping across functions is where they get impossible to reason about.
I didn't make the meme, I just laughed at it
 
I didn't make the meme, I just laughed at it
Dumbass article nigger said:
Octals have long been shown as extremely poorly designed in C and C-adjacent languages that picked up the very, VERY weird habit of leading zeros turning numbers into base-8 (octal) numbers. The justification was, as ever, “Unix Permissions!!!”. Unfortunately, that’s a feature for 0.001% of absolute and complete nerds,
aka anyone who has ever opened a file on a Unix-like system??? What a stupid gorilla nigger I hate this guy. These are the people who work on C standards. It’s the tide, oh the dismal tide.
 
What a stupid gorilla nigger I hate this guy. These are the people who work on C standards. It’s the tide, oh the dismal tide.
I find it hilarious that a furry is working on the standards. The best part is how all of these improvements are perfectly reasonable things good languages like Ada have had for decades, but put there by men who didn't represent themselves as anthropomorphic animals.

Suffer C language programmers, suffer.
 
aka anyone who has ever opened a file on a Unix-like system??? What a stupid gorilla nigger I hate this guy. These are the people who work on C standards. It’s the tide, oh the dismal tide.
I stumbled on this blog earlier while looking at the new standard proposal. They have an interesting one about different implementations of the embed directive which I found interesting
 
I find it hilarious that a furry is working on the standards. The best part is how all of these improvements are perfectly reasonable things good languages like Ada have had for decades, but put there by men who didn't represent themselves as anthropomorphic animals.

Suffer C language programmers, suffer.
C99 is the aryan man's standard anyway
 
I find it hilarious that a furry is working on the standards. The best part is how all of these improvements are perfectly reasonable things good languages like Ada have had for decades, but put there by men who didn't represent themselves as anthropomorphic animals.

Suffer C language programmers, suffer.
Most of the features he talks about are alright. I don’t even mind the new octal syntax (just that absolutely boneheaded comment). Labeled breaks are, quite frankly, pointless redundancy in a language that has goto. The new if declaration thing is a welcome intrusion of Go into C, although making the conditional expression optional is dumb and works against readability imo. Case ranges are cringe and I will not be using them. C doesn’t have ranges as a first class feature like some languages, and so shoving this syntax in this one very specific situation is inconsistant and ugly. Moderns may not like it, but the proper C way to do this is with case fallthrough and explicitly including each value.

Goto and case fallthrough may draw the ire of modern computer linguists, but they’re integral parts of C and including what are effectively macros on top of them to satiate people who hate them is just silly. Frankly, any imperative language that doesn’t include goto is gimping itself to some degree. There are some situations where it is just the best option.
 
Labeled breaks are, quite frankly, pointless redundancy in a language that has goto.
Technically, sure, but I know Common Lisp and Ada both provide the option to name certain program units specifically to avoid this problem of leaving nested units. Ada in particular allows the programmer to name just about anything, to an extreme degree, however. I've used goto in Ada once, when writing some Task exiting code that wasn't as pretty as I'd like. The Ada solution to goto is to make the labels ugly; they look like this:
Code:
goto Label; -- Damn, no Ada syntax for code blocks here.  No Pascal either.
...
<<Label>>
It's clear, at least. There are also the usual rules about not jumping into the middle of control constructs from outside of them and things like that.

Amusingly, Common Lisp only has goto as its iteration construct, good old TAGBODY and GO, they're just wrapped up in so many macros that the programmer never has to deal with them unless he feels like it.
 
Back
Top Bottom