AFAIK they're not seriously considering it as a keyword, but they agreed that in all discussion about the semantics of exceptions they will use "yeet" as a placeholder for the keyword, so people will actually discuss the semantics and not whether the keyword is gonna be "raise", "throw", "except" or whatever (so-called Bikeshed Effect)
I mean, returning non-zero exit status on error is just good practice. It even managed to evaluate to the same numerical value as EXIT_FAILURE when I tested it on my machine (gcc 11.4.0 linux x86-64), although I'm not sure if that's always the case or if it's undefined behavior.
I did expect those kinds of tricks would cause syntax error in #defines, but instead looks like everything is allowed...
Some day someone #defines a such abomination that it creates universe wide black hole -like vacuum and everything ceases to exist.
33 Comments
JuxtaposedJaguar@lemmy.ml · 53 pts · 3y
Reminds me of lolcode:
fluxion@lemmy.world · 51 pts · 3y
And that's how rappers became the top programmers in the industry
gpw@lemmy.ml · 25 pts · 3y
Can't wait to see Lil Yachty around work
Lilium@lemmy.blahaj.zone · 39 pts · 3y
Artistry, on god frfr ๐๐
aseriesoftubes@lemmy.world · 35 pts · 3y
I have to say, I like the substitution of yeet for return. No cap.
gpw@lemmy.ml · 21 pts · 3y
All of my returns are going to be
yeetfrom now onMy code reviewers will respond to my commits with
on god ๐My manager will do girl math to determine my next raise
#zoom
technohacker@programming.dev · 4 pts · 3y
Rust has an RFC that wants to consider yeet as a keyword for throwing an exception, I think they're currently keeping it as a placeholder just in case
vanZuider@feddit.de · 4 pts · 3y
AFAIK they're not seriously considering it as a keyword, but they agreed that in all discussion about the semantics of exceptions they will use "yeet" as a placeholder for the keyword, so people will actually discuss the semantics and not whether the keyword is gonna be "raise", "throw", "except" or whatever (so-called Bikeshed Effect)
grue@lemmy.ml · 25 pts · 3y
Pro tip: the arguments to
main()don't have to be namedargcandargv.Also, you forgot to #define an alias for
atoi, andnumber,n, andicould've been named something more on fleek.bronzle@lemm.ee · 5 pts · 3y
Also could have takin out mains return type and used
sus chiefdarcy@sh.itjust.works · 2 pts · 3y
numberis a variable i thinkgrue@lemmy.ml · 5 pts · 3y
Yes, as are
nandi. Do they not deserve 'fleekness?'darcy@sh.itjust.works · 1 pts · 3y
sorry i misread. i thought u meant
numberwas not#define'ddb2@sopuli.xyz · 21 pts · 3y
Does it make me a bad person that I like this?
Edit: wait..
return ! 0 ;wtfEdit 2: idc still like it frfr no cap
grue@lemmy.ml · 5 pts · 3y
I mean, returning non-zero exit status on error is just good practice. It even managed to evaluate to the same numerical value as
EXIT_FAILUREwhen I tested it on my machine (gcc 11.4.0 linux x86-64), although I'm not sure if that's always the case or if it's undefined behavior.This cursed code is quite well-written.
bronzle@lemm.ee · 5 pts · 3y
!0 is defined as 1, thatโs how argv [ no cap ] works, that and the ridiculous argc check stood out as a bit off, but works
SnowdenHeroOfOurTime@unilem.org · 1 pts · 3y
Yes.
MrNoodleBox@lemm.ee · 18 pts · 3y
Reminds me of Rockstar. The example also implements Fizz Buzz.
rt136us@sh.itjust.works · 4 pts · 3y
That's my favorite esoteric programming language!
BleatingZombie@lemmy.world · 18 pts · 3y
I hate this. Where do I find more?
grue@lemmy.ml · 6 pts · 3y
https://duckduckgo.com/?q=abuse+of+the+c+preprocessor
Zucca@sopuli.xyz · 3 pts · 3y
Holy unholiness, Batman!
I did expect those kinds of tricks would cause syntax error in #defines, but instead looks like everything is allowed... Some day someone #defines a such abomination that it creates universe wide black hole -like vacuum and everything ceases to exist.
NegativeLookBehind@kbin.social · 18 pts · 3y
My eyes are bleeding
gpw@lemmy.ml · 23 pts · 3y
The path to salvation is filled with terrors and temptation
no cap
bronzle@lemm.ee · 17 pts · 3y
For those curious:
OniiFam@lemmy.blahaj.zone · 15 pts · 3y
RickyRigatoni@lemmy.ml · 13 pts · 3y
i am seething with rage
Zucca@sopuli.xyz · 4 pts · 3y
I'm not a C programmer (is this code even C?), but I anticipated seeing comments like this. ๐
Mr_Reach@lemmy.world · 10 pts · 3y
I threw up in my mouth.
blackluster117@possumpat.io · 9 pts · 3y
It's like watching a car crash in slow motion trying to read it. I can't look away...
Jax@kbin.social · 7 pts · 3y
I was going to suggest ALL CAPS in response, but then I remembered COBOL already exists.
quinkin@lemmy.world · 5 pts · 3y
frfr
Stinkypete@lemmy.ml · 3 pts · 3y
I'm dumb . does the program do anything?
Starry@lemmy.world · 14 pts · 3y
This is FizzBuzz.
bronzle@lemm.ee · 1 pts · 3y