Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Response to Torvalds (C++)

Name: Anonymous 2011-07-29 21:03

Name: Anonymous 2011-07-29 21:21

"This is a very typical code you will see made by the average C programmer: "

>for(i = 0; i < strlen(line); i++)
>{
   ...
   doSomethingWith(line);
   ...
>}


I don't do that.

Name: Anonymous 2011-07-29 21:28

I have seen it done.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2011-07-29 22:09

>>1
Whoever wrote that response is a fucking idiot and needs to do something that requires a little less mental power. Like working a cash register at Target.

Name: Anonymous 2011-07-29 22:12

>>4
You're a butthurt biased C conspirator.

Name: Anonymous 2011-07-29 22:22

>>1
cock sucker detected

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2011-07-29 22:24

>>5
Possibly. But at least I know how much a pair of black leggings at Target cost.

Name: Anonymous 2011-07-29 23:54

If it ain't Lisp, it's crap.

Name: Anonymous 2011-07-30 0:01

I agree with >>1 on all counts.

Name: Anonymous 2011-07-30 0:04

If it's Lisp, it's shit.

Name: Anonymous 2011-07-30 3:11

>>4
Actually he's right for the most part. Sure a lot of that response consists of "doing <x> in C++ will actually result in more productive...", however he has his points.
And you're just butthurt that someone just named your 'hero' an idiot.

Name: Anonymous 2011-07-30 7:13

Opposition to any programming paradigms and concepts related to those paradigms which are not possible or very awkward to use in C. These include things like object-oriented design, abstraction, etc.
Bullshit. Structures cover most of what a programmer needs from OOP and C does of course support abstraction.

for(i = 0; i < strlen(line); i++)
{
    ...
    doSomethingWith(line);
    ...
}

Nobody sane actually does that.

As for the quality of the code, in order to see what kind of code C leads to it's simply enough to take almost any open source C program out there and examine how it has been done. Just as an example let's take the mplayer software, which is the most popular media player in Linux. Let's examine, for example, its libavcodec/h264.c file:

This one single file has a whopping 8306 lines of code. As an example of a function, the fill_caches() function in this file is a whopping 462 lines long, and looks like this. (The few comments in that code are worth reading.) As an example of another function, the decode_mb_cavlc() function, which is 492 lines long and looks like this.

Video decoding code is always ugly, no matter the language. This is FUD.

His claim that using the STL causes "inefficient abstracted programming models" is simply not true. Using STL right causes the program to be more efficient, a lot safer and much easier to understand and maintain.
The STL is terrible as it encourages the programmer not to care about which data structure is adequate for what ey's doing.

In the vast majority of cases when a C-hacker hears the term "object-oriented" or "class", what he actually hears is "virtual functions", and his prejudiced brain immediately makes the connection "virtual functions → slow → bad", and they immediately become completely deaf to anything else. They seem to think that using classes means that you absolutely must use inheritance (not true), you must use virtual functions (not true) and that virtual functions are extremely slow (not true).
Firstly, virtual functions are very slow. If your entire programs rely on them, the performance degradation isn't negligible. Secondly, what's the point of using classes over structs if you don't use inheritance?

What SEPPLESers don't understand, is that the choice of C over SEPPLES isn't primarily a question of language, but of mentality. It is the faith in non-bloated software, the hope to disprove Wirth's law, the conviction that laziness isn't an excuse for unreasoned use of abstractions.

Name: Anonymous 2011-07-30 7:21

>>12
Firstly, virtual functions are very slow.
Welcome to 1990, where computers ran with 40MHz at most. Of course virtual functions are slow (compared to regular functions, you'll add one or two more pointers and a cache fault or two). But we've moved on, and arrived in 2011 now.

Name: Anonymous 2011-07-30 7:26

>>13
I'll never understand Sepples programmers. They first go all ``C++ is VROOM VROOM AS FAST AS C'', then this.

Name: Anonymous 2011-07-30 7:40

>>14

VROOOOOOOOOOOOOOOOOOOOOOOOOOMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

Name: Anonymous 2011-07-30 7:49

>>12
O(1) strlen is not bloat, using sizeof(size_t) space for every vector and string to store the length is not bloat, optional bound-checking is not bloat, having a well engineered standard library that helps the programmer instead of randomly fail is not bloat, having a module/package system instead is not bloat, a decent macro preprocessor is not bloat, having twelve different procedures to do the same thing because the standard didn't, doesn't and will never get them right the first, second, third, fourth, ..., time is bloat, having a shitty header files ``system'' to manage imports that only get copied inside the current file is bloat, having a context-sensitive grammar is bloat.
Most apply to C++ as well.

Name: Anonymous 2011-07-30 8:09

>>14
NOTHING is as fast as C.

Name: Anonymous 2011-07-30 8:44

>>17
Where can I find a NOTHING compiler?

Name: Anonymous 2011-07-30 8:47

>>16
s/bloat/shit/g

Name: Anonymous 2011-07-30 9:07

>>13,14
It's more an issue of needless indirection. C++ is as fast as C if you don't abuse its features. If you used the equivalent of a virtual function in C when it was needed, and not when it isn't, unlike C++ which tends to encourage its use everywhere.

Name: Anonymous 2011-07-30 10:14

[...] unlike C++ which tends to encourage its use everywhere.
Last time I checked, most books (i.e. all I have) on C++ explicitly mention that methods should only be declared virtual if the situation/architecture/God demands it.

Name: Anonymous 2011-07-30 12:58

Both C and C++ suck shit. Anyone who disagrees is a moron.

Name: Anonymous 2011-07-30 14:11

>>22
Fuck you ``faggot"

Go suck dick ``faggot"

Name: Anonymous 2011-07-30 14:32

>>17
python

Name: Anonymous 2011-07-30 15:07

There's only one language worse than C++, and that is C.

Name: Anonymous 2011-07-30 15:46

>>25
lisp is even worse

Name: Anonymous 2011-07-30 16:06

>>25
>>26
The English word for what you're trying to say is ``better''. Be careful not to confuse it with ``worse''!

Name: Anonymous 2011-07-30 19:39

One could ironically say that knowing well C doesn't seem to help you write logical sentences in English.
...er.

Name: FrozenVoid 2011-10-26 13:23

If safety and re-usability was really the points >>1, Java would be written in Ada or some strict pascal dialect.
But no, Java is written in a mix of C++ and asm, like most of these  "innovative" "safe" "purely functional" languages.

Name: Anonymous 2011-10-26 14:00

Jesus, what a stupid article. The worst part is he's completely poisoned the well; any attempts at a retort will just result in, `Lol! Seems you have C-hacker syndrome bro!'

Oh well. At least this will tarnish the author's reputation, whoever he is.

Name: Anonymous 2011-10-26 14:43

>>29
Have you ever listen to James Gosling speak about why Java was designed the way it was? Based on your moronic response, I'm willing to say no. I would give you a link to the interview, but given your limited mentality, I don't think you would actually make it beyond the second paragraph.

Name: Anonymous 2011-10-26 15:14

>>31

Please do, i'm not the person you were responding to but would like to read it.

Name: Anonymous 2011-10-26 15:25

Oh wow, more sepples butthurt. It is amazing the depths to which a pro-C++ shill will sink.

Name: Anonymous 2011-10-26 15:39

JESUS FUCKING CHRIST WHY DID YOU BUMP THIS
I'M RAGING SO HARD AT JUHA NIEMINEN RIGHT NOW
HOW CAN C++ FAGGOTS BE SO RETARDED

On a more serious note, picking at h264.c is quite funny. The only h.264 decoder I know written in C++ is Microsoft's, and it's about twice as slow as libavcodec's.

That whole rant is almost as retarded as that shit Stroustrup wrote where it compared a C++ program against a C one that called realloc() in the inner loop.

Why do I even care, there's a reason all these libraries (and the kernel) are written in C, if they want to make a point they should try rewriting them in C++ and see what comes up. It'd be funny to watch to say the least.

Name: Anonymous 2011-10-26 15:59

ALL HAIL JAVA
GC is shit.

Name: Anonymous 2011-10-26 16:00

ONE WORD
NOT EVEN C IS AS FAST AS C
THREAD OVER

Name: Anonymous 2011-10-26 19:00

....

After reading the original post... I noticed 3 things.

1) The writer of the original article is some butthurt C++ fag.

2) The writer of the original article is some butthurt C++ fag that knows that linus knows his shit, and couldn't even bother posting his name, fake or otherwise to man up to his claims.

3) The vast majority of his complaints stem from actually having to know your shit in C... instead of using some library someone wrote in C++. I'm sorry, at the point you get butthurt because someone wants you to know your shit instead of copy-n-pasta... the fuck are you doing?

Name: Anonymous 2011-10-26 19:03

>>37
butthurt [...] fag
Go back to /g/.

Name: Anonymous 2011-10-26 19:55

I have to disagree with everything in the original article. My work went from hiring C++ programmers to hiring C programmers and our productivity increased 100%. It took us a bit to deal with not having a library already made for everything you want, but the boon was getting into making your own libraries for the things you need. And becoming a better programmer.

Name: Anonymous 2011-10-26 20:50

I am programming language agnostic. I do my work in terms of the bigger picture, not based on trifling matters. ( ≖‿≖)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List