It's just C with two plus signs, how hard could it be?

3 months ago by danhab99 to c/programmer_humor

Edit: sorry I didn't realize I already posted this

Kenny2999 80 points 3 months ago

The difference is meaningless for large values of C.

path: 0 24741417, hotness: undefined, score: 80, children: 3
csm10495 8 points 3 months ago

Though if it's a signed number a large enough value can become a negative.

path: 0 24741417 24747727, hotness: undefined, score: 8, children: 1
ChaoticNeutralCzech 5 points 3 months ago

If it's a float, it will stop incrementing when the precision stops covering every integer

path: 0 24741417 24747727 24752197, hotness: undefined, score: 5, children: 0
victorz 1 point 3 months ago

The value of c is a large constant so I guess it's always meaningless.

path: 0 24741417 24768937, hotness: undefined, score: 1, children: 0
nightwatch_admin 47 points 3 months ago

It’s just C with a garbage collector built-in, so even easier, duhhh.

path: 0 24740562, hotness: undefined, score: 47, children: 12
thoughtfuldragon 28 points 3 months ago

I may have missed the joke but C++ doesn't have built in garbage collector. Even recent versions of the standard merely allow it but don't specify it is required.

path: 0 24740562 24741050, hotness: undefined, score: 28, children: 1
mkwt 1 point 3 months ago

People have written garbage collectors for C++, but just about no one used the standard library support that was in the standard.

path: 0 24740562 24741050 24751338, hotness: undefined, score: 1, children: 0
silver_wings_of_morning 19 points 3 months ago

no that's the other c-and-four-lines, just arranged differently, the |||| are arranged in # for the garbage collected one, not ++

path: 0 24740562 24745721, hotness: undefined, score: 19, children: 0
pelya 5 points 3 months ago

More like garbage dispenser.

Pro C++ coders don't use delete, they call abort()

path: 0 24740562 24748653, hotness: undefined, score: 5, children: 1
marcos 1 point 3 months ago

"Garbage collector" is a mechanism that collects garbage.

If it recycles the space of throws it into the specs isn't determined on the name.

path: 0 24740562 24748653 24751914, hotness: undefined, score: 1, children: 0
parlaptie 2 points 3 months ago

Did you forget the /s or is this the tactic where you intentionally post wrong statements in order to get people to correct you so that you learn something?

C++ doesn't have a garbage collector

path: 0 24740562 24741264, hotness: undefined, score: 2, children: 6
call_me_xale 27 points 3 months ago

I think the "duhhh" is a pretty good stand-in for a sarcasm marker

path: 0 24740562 24741264 24742049, hotness: undefined, score: 27, children: 1
nightwatch_admin 3 points 3 months ago

Thank you!

path: 0 24740562 24741264 24742049 24745227, hotness: undefined, score: 3, children: 0
solrize 3 points 3 months ago

A garbage collector is just a monoid in the category of endofunctors, what's the problem?

path: 0 24740562 24741264 24751945, hotness: undefined, score: 3, children: 0
cactusupyourbutt 1 point 3 months ago

just make everything a shared_ptr and it kinda does

path: 0 24740562 24741264 24755886, hotness: undefined, score: 1, children: 0
Cease -11 points 3 months ago

"WHeRe's DuH /s I CaN't KnOw If ITs a JoKe"

This isn't reddit, maybe use your brain instead of getting angry for not having reading comprehension skills lmao

path: 0 24740562 24741264 24742459, hotness: undefined, score: -11, children: 1
Viceversa 14 points 3 months ago

Sorry, garbage collector took your comment

path: 0 24740562 24741264 24742459 24743119, hotness: undefined, score: 14, children: 0
olafurp 34 points 3 months ago

I watched an hour long video on why C++ sucks. I thought it wouldn't be too hard to pick up since I can program well in probably 7 languages. I was wrong, now I'm convinced C++ is a dumpster fire and needs to die and I'll never get a job in it unless someone holds a gun to my kid.

Edit: Actually two hours, but very fun (for people like me)

https://m.youtube.com/watch?v=7fGB-hjc2Gc

path: 0 24741989, hotness: undefined, score: 34, children: 7
unknownuserunknownlocation 23 points 3 months ago

To be fair, an hour long video about why C++ sucks maybe isn't the best source if you're trying to get a balanced view.

I'll out myself: I kind of like C++. Yes, it definitely has its sharp edges, but I like how much you can do with it. You can do object oriented, functional, procedural, in fact there's not much it can't do. You can stay high level or you can go very low level (pretty much just drop into C if necessary). Yes, it's complex, but once you have a decent feel for it you can do a massive amount with it, especially with the newest versions. And that despite it running on bare metal without any VM or anything. Probably the most frustrating part for me is that the standard library is in many cases stuck with old C++ paradigms. But otherwise, I like C++.

path: 0 24741989 24746420, hotness: undefined, score: 23, children: 1
olafurp 1 point 3 months ago

Yeah, the video was mostly targeted at working with C++ in a large scale project with a bunch of legacy dependencies. He basically explains the reason why "decades to learn" is a reasonable statement in a nice way. I'm going to link the video if I find it.

path: 0 24741989 24746420 24758512, hotness: undefined, score: 1, children: 0
slazer2au 6 points 3 months ago

Just hope the gun isn't in c++ otherwise it will blow off the shooters hand too.

path: 0 24741989 24743258, hotness: undefined, score: 6, children: 0
benni 4 points 3 months ago

I love that video but I also love C++. He is right that C++ has an endless list of moderately bad to horrible design flaws, but a lot of those are related to features that you can (in many cases) simply decide not to use. So you don't really need to master them and I'd bet that the majority of C++ developers are unaware of many issues raised in the video and in the end their software still works to an acceptable degree. To me the main advantage of C++ over any other language is that it is widely used in really cool applications. Of course it's subjective what's a cool application and what isn't, but I recommend just typing C++ into a job search website of your choice and contrasting the results with those of other languages to see what I mean.

If you're interested in the language, it's good to be aware of all these issues, but don't let it discourage you from learning the basics and contextualizing these issues for yourself.

path: 0 24741989 24826699, hotness: undefined, score: 4, children: 0
sp3ctr4l 3 points 3 months ago

Genuine question:

Would you have a reccomendation for a comparable alternative?

Like, I have experience with a good deal of scripting languages, sql variants... am currently trying to do Morton coding/interleaving for octrees in Godot.

I have the framework working in GDScript... theoretically, if its not performant enough, i could either attempt to transition it to C++ / GDExtension... or, potentially, I could do a 'Rustdot' type thing, apparently its possible to... do that.

So, while I am only really aware of Rust as a potential alternative to C++, in my specific context... would you have a broader opinion of lower level languages? I just actually don't know much about them.

path: 0 24741989 24756010, hotness: undefined, score: 3, children: 2
olafurp 4 points 3 months ago

I mean, gdscript in godot is very nice and convenient. It offloads a lot of the heavy labor to the engine already and is very well optimised. If you need more speed and type safety C# is the logical next step. C# is very convenient and easy to pick up if you already know Typescript for being a strict language.

Also the guy's criticism of C++ is basically that nothing is bundled in and keeping libraries compatible with each other is a PhD level activity. The packages are also allowed to fuck with your code with macros, preprocessing directives etc. on top of being written in a non-compatible standard where they only provide a compiled binary with an ABI instead of giving you the source. Updating dependencies becomes a massive pain also because of the same reason since it can so easily break everything without any reasonable stack trace. You might say "Ok whatever, I'll just preprocess my C++ and rename all by variables" but dependencies can also break other dependencies with macros so there's no escape. One dep updates, another one breaks in an 100% unrelated part of the program.

But for a reasonably sized project where C++ dependencies are already handled by Godot it's not that bad. Especially if you're the only developer or have at least good codebase standards on what parts of C++ you will use. I've personally not had any issues programming in C++ but that's probably because I've never done anything at any scale whatsoever.

I don't have a strong opinion on lower level languages since I work in garbage collected languages but I've heard good things about Zig, heard Rust in slow-mo development with a steep learning curve but very robust, C is nice and simple but lacks modern features.

TL;DR C++ devs would kill to get something like cargo in Rust, not because it's a package manager but because it's a standard for sharing code and managing compatability. If that's not an issue for you C++ is a solid language like any other.

path: 0 24741989 24756010 24758374, hotness: undefined, score: 4, children: 1
sp3ctr4l 3 points 3 months ago

I don't have much to say in detail, other than 'thank you for the very well worded and thought out response!'

I will have have to chew on this for a while, I think, to fully grasp all of it, hah!

path: 0 24741989 24756010 24758374 24765007, hotness: undefined, score: 3, children: 0
FelineFanatic 27 points 3 months ago

Well its got the ++ right there, so its exponential!

path: 0 24741112, hotness: undefined, score: 27, children: 4
SpaceNoodle 40 points 3 months ago

No, it's just incremented

path: 0 24741112 24741268, hotness: undefined, score: 40, children: 0
Evotech 11 points 3 months ago

Found the non programmer

path: 0 24741112 24742122, hotness: undefined, score: 11, children: 0
ThomasWilliams 1 point 3 months ago

Its pronounced C double plus because its doubleplusgood.

path: 0 24741112 24772536, hotness: undefined, score: 1, children: 0
dohpaz42 1 point 3 months ago

You’re hired!

path: 0 24741112 24747201, hotness: undefined, score: 1, children: 0
BoosBeau 8 points 3 months ago

It's a single letter of the alphabet, it's LITERALLY so easy.

path: 0 24745477, hotness: undefined, score: 8, children: 0
kryptonianCodeMonkey 4 points 3 months ago

DECADES!? Read and type faster, dude!

path: 0 24748927, hotness: undefined, score: 4, children: 1
victorz 1 point 3 months ago

Decades to learn sounds kind of long, indeed.

path: 0 24748927 24768980, hotness: undefined, score: 1, children: 0
anon_8675309 1 point 3 months ago

For some reason language designers and developers both seem to think languages should be HUGE. Fuck that. I prefer tiny languages. I don’t care if it doesn’t have generics. I don’t care if it doesn’t have a kitchen sink library. I just want the entire syntax to fit in my head.

path: 0 24770180, hotness: undefined, score: 1, children: 0
Jankatarch 1 point 3 months ago

The "decades" part aside, I am pretty annoyed how they want experience with specific libraries for entry level positionsm

path: 0 24770405, hotness: undefined, score: 1, children: 0
zxqwas 1 point 3 months ago

It's not discrimination if they give that as a reason for not liking you.

path: 0 24741631, hotness: undefined, score: 1, children: 0
programmer_humor
programmer_humor

@programming.dev

login for more options
33675
2568
7703

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.

go to feed...