As much as this hurts,
yeet;
as an aliasthrow;
is hilariousOf all the gen z lingo yeet is the best.
You can yoink that word from my cold, dead hands!
Funnily enough, that is a keyword in rust.
(it’s a placeholder to remove any bikeshedding)
I don’t get the joke. Is the one on the left actually valid C# code?
C# is basically Java and from what I can tell, this looks approximately valid.
Variables can always* be named freely to your liking.
*You used to have to stick to the Latin alphabet, but that’s increasingly not the case anymore. Emoji-named variables FTW!
No it’s not “basically Java”
Aside from how Microsoft stole it, fucked the standard library, fucked the naming conventions, etc. You would never just “throw” without specifying what you were throwing.
As a C# developer Java go go and die lol. It sucks imo.
Everyone is entitled to their own opinion.
To be honest I’m just playing into the meme of Java.
My understanding is it’s academically great, but a pain in practice.
For reference we use C# .Net, Entity Framework with GraphQL and React TypeScript for our enterprise applications and I really like C# now, but when I first started I’d only really used Node.js and some Java.
No problem. I’m not sure if all of that would run on all the platforms I use.
This is incorrect. The C# is valid. Throw in a catch statement simply rethrows the caught exception. Source: I’ve been writing C# for 20 years, also the docs.
I won’t act like MS absolutely didn’t steal core concepts and syntax from Java, but I’ve always thought C# was much more thoughtfully designed. Anders Hejlsberg is a good language designer, TypeScript is also a really excellent language.
In Java you would say “throw e;” (to rethrow the same exception you just caught.)
You wouldn’t just say “throw”
Or you could also throw some other exception. But the syntax requires you specify what it is you are throwing. (And sane in C++, where you could throw any object, even a primitive.)
So that was my question.
Wildly, in C# you can do either and it has different results. I believe a bare
throw
doesn’t append to the stack trace, it keeps the original trace intact, whilethrow e
updates the stack trace (stored on the exception object) with the catch and rethrow.In C#, you can only throw objects whose class derives from Exception.
It looks valid but vibe isn’t declared anywhere so it won’t compile.
deleted by creator
I really really dig the fuckaround/findout. It paints the try/catch with a more dreadful undertone and reeks of mystery.
As well as the
yeet
keyword, I’m really friggin’ diggin’ this. [modernisation required]Oh yes, this one too of course!
#define yeet throw #define let const auto #define mut & #define skibidi exit(1)
The future is now!
just what you want from code !
Exactly!
Yeah, I love that one.
“Try” is too hopeful. “fuck_around” makes it clear that you know what you’re doing is dangerous but you’re going to do it anyhow. I know that in some languages wrapping a lot of code in exception blocks is the norm, but I don’t like that. I think it should be something you only use rarely, and when you do it’s because you know you’re doing something that’s not safe in some way.
“Catch” has never satisfied me. I mean, I know what it does, but it doesn’t seem to relate to “try”. Really, if “try” doesn’t succeed, the corresponding block should be “fail”. But, then you’d have the confusion of a block named “fail”, which isn’t ideal. But “find_out” pairs perfectly with “fuck_around” and makes it clear that if you got there it’s because something went wrong.
I also like “yeet”. Partly it’s fun for comedic value. But, it’s also good because “throw” feels like a casual game of catch in the park. “Yeet” feels more like it’s out of control, if you hit a “throw” your code isn’t carefully handing off its state, it’s hitting the eject button and hoping for the best. You hope there’s an exception handler higher up the stack that will do the right thing, but it also might just bubble all the way up to the top and spit out a nasty exception for the user.
The whole thing was pretty damn good all the way through. The only thing that had me wondering was
Tea
Until it got to
SpillTea
Well played.
the suspense!
NGL, that helped me actually understand the original function. It’s been over a decade since I’ve touched anything related to C.
Now I wanna see this in jive
I’ve seen forms of this joke quite a lot in the last few years, and it never fails to make me laugh.
Aliasing no_cap and cap to true and false…
I might have to steal that…
play_stupid_games { // ... } win_stupid_prices(thePrice) { // ... }
FAFO block passes better
I always thought it was “prizes”
Thx and sorry. My spelling skills are bad.
Have you seen eggs lately, though?
It is.
No, this is what they win:
ratios
I need this and I’m an elder millenialRatio is when your comment receives less upvotes than my reply, you get ratioed.
I know! (Jumpin’ Jehosaphat!, I’m no boomer!) 🤭
(ノಠ益ಠ)ノ彡┻━┻
It’s so painfully good.
Ah, yes. A private method for working on a public field.
Ah but maybe the vibe is a
lowkey period
we can’t be sure
Ugh. Just
its_giving rizz ratios vibe;
No more needless nestling plz
Honestly, that’s about an inch away from Python…
Its literally bash
Considering
vibe
is probalbyfloat
, I doubt any exceptions can be thrown there, you can eliminate another useless scope.Even if it’s not
float
, I’d consider burning alive anyone who overrides an operator like this anyway.Float
? Do you meanfax
? Get with the program, old manIf you confused
period
andfax
intentionally, I commend the effort.
i hate it so fucking much
I fucking love it. Gen Z slang is so lighthearted and fun.
It’s because we are depressed nihilists who have given up on pretty much everything, running on gallows homour to a point where we are meming youth slang. Don’t worry, we’re fine haha… Ha…