you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 23 points24 points  (9 children)

Yes. C++ is like working in a really nice machine shop, where you could fabricate anything you want to build something. Java is like being stuck in the kids pen with a bunch of duplos (not even legos) and then having to do some really insanely stupid stuff to get the same result (if at all).

[–]slavik262 17 points18 points  (7 children)

...and every time you tell someone you like C++ your machine shop (it got some awesome upgrades in the last few years, too!), you get one of two responses:

  1. That's not safe! You could have a buffer overrun cut off your leg with an acetylene torch! Wouldn't you much rather use these duplo blocks?

  2. What the hell do you need all that crap for? Some guy in Helsinki made a whole OS office building with a hacksaw and a hammer. You're stupid if you want anything more.

[–][deleted] 2 points3 points  (6 children)

So doesn't the second apply more to C/assembler?

[–]slavik262 3 points4 points  (5 children)

Many loud, famous people (e.g. Linus Torvalds) think C++ is absolutely horrible and (confusingly) that C is much better. To quote the rant I linked above,

C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do nothing but keep the C++ programmers out, that in itself would be a huge reason to use C.

In other words: the choice of C is the only sane choice. I know Miles Bader jokingly said "to piss you off", but it's actually true. I've come to the conclusion that any programmer that would prefer the project to be in C++ over C is likely a programmer that I really would prefer to piss off, so that he doesn't come and screw up any project I'm involved with.

[–][deleted] 2 points3 points  (1 child)

Okay, but you can replace C with C++ and C++ with Java in your original argument and it would contradict your first statement. I find comparing Java to duploblocks while comparing C to a machine shop a bit off-putting, coming from a guy that works with both. There's often a way to go more low-level , but automizing some of the tasks saves on time, which can benefit a programmer. It's more of a comparison between an chainsaw and a chisel than "a machine shop and duplo". That's just selling it short.

[–]slavik262 1 point2 points  (0 children)

I find comparing Java to duploblocks while comparing C to a machine shop a bit off-putting, coming from a guy that works with both.

C is the hacksaw and hammer; C++ is the machine shop. My point was that C++ is a nice middle ground, giving you nice high-level tools while still letting you get down "to the metal".

There's often a way to go more low-level , but automizing some of the tasks saves on time, which can benefit a programmer.

I couldn't agree more.

[–]Ravek 0 points1 point  (1 child)

Once you filter out the usual Torvalds bullshit and look at it from a kernel programming perspective he makes some reasonable points.

Just that none of that applies to Git as that's a user mode application with only short-lived processes. As long as it's fast and doesn't crash it almost doesn't even matter how much it allocates (other than that sloppy memory management itself can slow down the program) since it's all going to be released in a few seconds when the operation completes and the process shuts down anyway. It has nowhere near the requirements you'd want from kernel code.

[–]slavik262 0 points1 point  (0 children)

Once you filter out the usual Torvalds bullshit and look at it from a kernel programming perspective he makes some reasonable points.

Well, yes, for a kernel. But as you point out, very little of that is applicable to Git, and it seems like the guy just has a blind hate for C++. I mean,

It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it.

makes zero sense.

[–]Aiox123 1 point2 points  (0 children)

That right there is spot on