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

Pages: 1-4041-8081-

Why c++ sucks dick

Name: Anonymous 2009-03-11 4:30

1) shitty compilers, shitty error messages.
-Try writing a program to insert a random character anywhere in a code file of 100 lines and see how long it takes you to track it down.  Super bonus points if the code file uses templates or is a template.  Fucking ridiculous.

2) shitty run time error messages.
-So you finally manage to fix your syntax errors, that must be the worse of it right? HAHAHAHA, good one.  You try running your program, it crashes.  No error message, no segmentation fault, nothing.  Any respectable language would tell you exactly what was wrong along with a line number and a stack trace right then and there, also handled in run time if need be(perhaps submitted as a bug report?).  In a c program, you have to compile it and run it again in debug mode.  Then maybe, if your lucky, you get a line number or a core dump.  If you are really lucky, the line number is in your file, and if you have a respectable IDE, like visual c++, you can mouse over the variables, etc.  Debugging c++ sucks ridiculous miles of dick compared to respectable languages.

3)Has terrible support for basic features
-Take for example one of the simplest data structures, a multi-dimensional array.  It has a million different uses, and yet god forbid you want to use one in c++.  You are almost always better off in c++ allocating a single dimensional array and then indexing into it like[row*rowlength+column] that, which becomes annoying as fuck when you have to type it over and over again, especially for higher dimensions. Fucking despicable.

4)Ridiculously slow compile times, even for unoptimized code.
-I'm sorry, there is just no excuse for this, whoever wrote the code for the compilers must have been fucking retarded, god fucking dam.

God Fucking Damn.

Name: FrozenVoid 2009-03-11 4:31

Name: FrozenVoid 2009-03-11 4:31

Name: Anonymous 2009-03-11 4:36

>>1

Have you ever considered that you just suck?

Oh wait, IHBT

Name: Anonymous 2009-03-11 4:57

3)Has terrible support for basic features
-Take for example one of the simplest data structures, a multi-dimensional array.  It has a million different uses, and yet god forbid you want to use one in c++.  You are almost always better off in c++ allocating a single dimensional array and then indexing into it like[row*rowlength+column] that, which becomes annoying as fuck when you have to type it over and over again, especially for higher dimensions. Fucking despicable.

that's pretty funny, since multi-dimensional arrays in c are pretty easy. good job, sepples.

4)Ridiculously slow compile times, even for unoptimized code.
-I'm sorry, there is just no excuse for this, whoever wrote the code for the compilers must have been fucking retarded, god fucking dam.

just don't use any templates. but then you've given up the only thing sepples has that c lacks.

Name: Anonymous 2009-03-11 11:42

>>3 has the right idea. C# works too, so long as you're ball-gagged and forced at gunpoint to code for Windows.

Basically C++ is on the fast track to being completely irrelevent.

Name: Anonymous 2009-03-11 16:02

>>5
Fucking wrong, go back to school you amateur.  I'm talking about DYNAMIC multi-dimensional arrays. Since assuming you know the dimensions of your array at compile time is ridiculously limiting. Fucking despicable.

Name: BJARNE 2009-03-11 16:04

>>7
How would you implement it then?

Name: Anonymous 2009-03-11 16:31

>>7
Use vectors, dickhead.

Name: Anonymous 2009-03-11 16:32

>>7
use dictors, vechead

Name: Anonymous 2009-03-11 16:33

>>10
A thin stream of piss shot directly down my leg.

Name: Anonymous 2009-03-11 16:46

>>11
you might want to see the doctor about that

Name: FrozenVoid 2009-03-11 16:49

Vectors are like linked-lists, their special structure introduces inefficiencies which are making them all slower then arrays.

______________________________________________
A State is absolute in the sense which I have in mind when it claims the right to a monopoly of all the force within the community, to make war, to make peace, to conscript life, to tax, to establish and dis-establish property, to define crime, to punish disobedience, to control education, to supervise the family, to regulate personal habits, and to censor opinions. The modern State claims all of these powers, and, in the matter of theory, there is no real difference in the size of the claim between communists, fascists, and democrats.

Name: Anonymous 2009-03-11 17:10

>>8
Either use a single array and treat it as a 2d array or boost::multi_array .  Either way the point still stands since they are both fucking terrible.

Name: Anonymous 2009-03-11 17:12

>>13
Vectors are like linked-lists
good one, FV! ;-)

Name: Anonymous 2009-03-11 17:14


>>15
good one, FV! ;-)
good one, FAGGOT-POST-SEEER

Name: Anonymous 2009-03-11 17:48

>>16

Good one, FAGGOT-FAGGOT-POST-REPLIER

Name: Anonymous 2009-03-11 18:14

>>17
StackOverflowError

Name: Anonymous 2009-03-11 18:24

>>17
Did you just imply my post is faggot?

Name: Anonymous 2009-03-11 18:32

my post is faggot!

Name: Anonymous 2009-03-11 19:12

fib8 get

Name: Anonymous 2009-03-11 19:14

6th discrete biprime get

Name: Anonymous 2009-03-11 19:20

fifth Sophie Germain prime and the fourth safe prime get

Name: Anonymous 2009-03-11 23:34

>>20

Your post is FOOP

Name: Anonymous 2009-03-11 23:37

first square of a wilson prime get

Name: Anonymous 2009-03-12 1:17

What the hell happened to >>13,15-19?

Name: Anonymous 2009-03-12 2:20

cobalt get

Name: Anonymous 2009-03-12 2:29

second perfect number get

Name: Anonymous 2009-03-12 6:17

Størmer get

Name: Anonymous 2009-03-12 11:14

for noobs that have trouble coding c++ (we've all benn there) I advise you compile every few lines so you can catch errors where they start.

Name: Anonymous 2009-03-12 11:17

>>30
Are there any C++ IDEs that compile automatically in the background and catch errors as you type, as Visual Studio does for VB.NET and C#?

Name: Anonymous 2009-03-12 11:23

>>31
Grab the C++ plugin for the eclipse.  It has incredibly zealous error checking system.  So much so it'll tell you your line of code is wrong because it's incomplete even if you're still typing it.

Name: Anonymous 2009-03-12 12:19

theres this guy that wrote a whole book on      using templates for stupid shit like template fibonacci functions and shit

basically, templates are like perl++

Name: Anonymous 2009-03-12 14:45

>>32
eclipse
DIE MONSTER! YOU DON'T BELONG IN THIS WORLD!

Name: Anonymous 2009-03-12 17:00

>>30
How retarded is it that C++ doesn't support interactive development? Very.

Name: Anonymous 2009-03-12 17:11

>>35

It's not C++ that doesn't support that crap, it's the IDE's that have been created for it you fucktard.

IHBT

Name: Anonymous 2009-03-12 17:20

>>33
I believe you are referring to Andrei Alexandrescu1, author of Modern C++ Design2 and he is a genius I masturbate to his image every time I compile my code.
                       
References:
[1] http://erdani.org/
[2] http://books.google.com/books?id=aJ1av7UFBPwC&dq=modern+C%2B%2B+design&printsec=frontcover&source=bn&hl=en&ei=IHy5ScOjJJLQsAPcjtAw&sa=X&oi=book_result&resnum=4&ct=result

Name: Anonymous 2009-03-12 17:31

>>36
While it is obviously possible to create an interactive Sepples hellenvironment, the fact that there is no professional-quality "liveSepples" in existence makes my statement true.

Name: Anonymous 2009-03-13 1:49

Much like Befunge, C++ is designed with the goal of being hard to compile and use.

Name: Anonymous 2009-03-13 3:46

>>39
Sepples, however, is infinitely more successful.

Name: Anonymous 2009-03-13 4:54

>>40
That depends on how you measure success. Try writing a befunge-98 compiler some time!

Name: Anonymous 2009-03-13 6:46

>>37
I have that book. I also agree that masturbating to his teachings while writing code is a very pleasant experience.

Name: Anonymous 2009-03-13 9:32

Why does C++ even exist? Why does MS keeps maintaining such a language that caused so many buffer overflows, and generally was not as secure as C# or Vb.NET.
 
 The only + point for C++ is that it compiles into machine code directly, and if we can get C# to do that, then there is no need for a language like C++.
 
 I was wondering why C++ still exists when C# is that good of a language.
 
 
 MS, why not retire C++, and just focus on C# and Vb.NET and F#?
 
 Expand C# capabilities, and get rid of P/invoke and replace it with a new kind of mechanism to call dlls outside the .NET framework.
 
 Finally, make the .NET framework really .NET, in the sense that it is distributed in terms of processing power, by enabling sharing. So that my application could use the processor that is Idle in a second room in the the house, automatically through the use of Remoting in LAN.
 
 Kill C++, and lets all be on one page, with C#.
 
 Its confusing many people, and things needs to be simpler, with few languages. C# for experts, VB.NET for beginners and intermediates.
 
 That is all.
 
 PS: some might say, there are programmers outthere who enjoy dealing with buffer overflows, and the pains of C++, and to them I say stick with Visual Studio 6 C++ IDE. and that is that.

Name: Anonymous 2009-03-13 9:43

>>43
.NET's performance is mostly a myth. You can often get a twenty-fold performance increase by writing a program in C++ instead of C#. Since there are a lot of important APIs that require you to write some C++ anyway, and bridging C++/.NET code is generally a nightmare, it's actually easier to just go with C++ entirely whenever you need to write a high-performance program, or one that accesses certain OS features.

Java is also faster than .NET

Name: Anonymous 2009-03-13 9:51

>>44
IHBT

Name: Anonymous 2009-03-13 10:26

>>45
No you haven't. It's all true.

Name: Anonymous 2009-03-13 10:33

WHBT

Name: Anonymous 2009-03-13 10:43

>>44
[quote]You can often get a twenty-fold performance increase by optimizing a program written in C# and then only a few percent more by rewriting it in C++.[/quote]
Fixed that for you!

[quote]bridging C++/.NET code is generally a nightmare, while bridging C/.NET code is like all automagical, so dropping C++ altogether is actually easier and yields faster code, whenever you need to write a high-performance program, or one that accesses certain OS features.[/quote]
and this needed a good ol' fixin' up too.

Name: Anonymous 2009-03-13 11:11

>>48
Massive BBCode failure.

Name: Anonymous 2009-03-13 11:43

>>33,37,42
Can you please upload that book somewhere good sirs?

Name: Anonymous 2009-03-13 11:55

>>50
http://rapidshare.com/files/208778976/Andrei_Alexandrescu_-_Modern_C___Design.rar

Don't have a PDF version, but CHM is fine too I guess.

Name: Anonymous 2009-03-13 12:42

>>51
Will be enough for now, thank you!

Name: Anonymous 2009-03-13 12:58

>>48
Don't get me wrong, C++ is a pig disgusting, huge gaping mountain of shit compared to C# (and considering C#'s roots in Java, that's saying a lot). It is sure as hell not enjoyable to program in, especially with Microsoft's ENTERPRISE-quality APIs blowing their load all over your source files.

But there's a reason developers still voluntarily suffer through the living hell that is the creation of a C++ app on Windows. It actually sometimes manages to be the lesser of two evils.

Name: Anonymous 2009-03-13 15:45

>>53
I'm pretty sure they just don't know any other languages, and they can't learn new ones because they can't tell the difference between syntax and semantics. That, and they have some weird meme that the garbage collector will bloat their forms application and attract incompetent programmers/quiche eaters.

Name: Anonymous 2009-03-13 16:09

>>53
First, I have a distinct impression that you don't know what you are talking about. There is no such thing as "Windows C++ API" (if we don't count MFC that no one uses, except truly cosmic idiots). There is pure C API and that is quite nicely usable from C#: in 50% of cases you'd just have to copypaste function definitions and replace "const char *" with "string", "char *" with StringBuilder (or "ref string", or maybe [Out] should/may be used as well, don't remember), primitive types like int or uint are passed as themselves, arrays are passed as arrays etc. In 40% more of cases you'd want to copypaste some "#define"s and run them over with a quick keymacro turning them into enums, in 9% of cases you'd have to copypaste a struct definition and prefix it with a StructLayout Sequential keyword, and only in the remaining 1% of cases you would have to resort to fixed&pointers (C# has pointers, did you know that?). And most of the definitions are free-as-in-free-beer on the internets, so you even don't have to write them. And marshaller takes care of the FUCKING char/w_char/MBCS DISTINCTION, for God's sake! So, basically, I don't see how C++ is so much better - or better at all - handling pure C API calls, that the advantage of writing in an acceptable programming language doesn't outweight it instantly. Oh, and you may want to wrap your calls to the "return required buffer size if the supplied buffer is too small" functions with something more useful, but then it's no C# neither WinAPI problem, actually.

And then there are COM API's, and believe me, C# handles them better than C++. Moreover, when C# 4.0 is out, the very question would seem meaningless.


Second, it doesn't seem like human stupidity and laziness decreased so significantly these days that it can't be pointed out as a valid reason for the existence of the few poor souls writing C++ Windows apps.

Name: Anonymous 2009-03-13 16:23

>>53
It has to be either because clueless managers demand it or because these programmers have never learned a better way. There are a whole lot of programmers who like C++ quite a bit. I don't believe that most programmers choose it because it's "the lesser of two evils", unless the greater evil, in their minds, is learning anything new.

Name: Anonymous 2009-03-13 16:23

Actually, C# has a pretty poor wrapper over COM, because the .NET team didn't properly understand it, according to the guy who invented COM.

Name: Anonymous 2009-03-13 17:18

>>57
This poor wrapper (and it is poor, just compare it to the C# 4.0 approach) is better still than the shit you have to squirt out in Sepples.

Name: Anonymous 2009-03-13 17:35

>>57
[citation needed]

Name: Anonymous 2009-03-13 18:31

I enjoy programming in Sepples.

Name: Anonymous 2009-03-13 18:36

>>60
Precisely. Just as I said, Sepples is not used because of its technical merits, just because there are idiots like >>60 who don't know any better.

Name: Anonymous 2009-03-13 18:57

I also find Sepples with Qt and boost to be a fairly pleasant experience (unlike naked C++). I need the performance anyway, my app is acquiring analog voltage data at nearly 200MS/s, processing it into images and displaying in real-time. Whatever the FrozenVoids around here say about high-level languages, it's not true that Java can provide even similar performance when you're not I/O bound.

Name: Anonymous 2009-03-13 19:15

>>62
*YOU* are full of bullshit.
 
 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.
 
 C++ leads to really really bad design choices. You invariably start using
 the "nice" library features of the language like STL and Boost and other
 total and utter crap, that may "help" you program, but causes:
 
  - infinite amounts of pain when they don't work (and anybody who tells me
    that STL and especially Boost are stable and portable is just so full
    of BS that it's not even funny)
 
  - inefficient abstracted programming models where two years down the road
    you notice that some abstraction wasn't very efficient, but now all
    your code depends on all the nice object models around it, and you
    cannot fix it without rewriting your app.
 
 In other words, the only way to do good, efficient, and system-level and
 portable C++ ends up to limit yourself to all the things that are
 basically available in C. And limiting your project to C means that people
 don't screw that up, and also means that you get a lot of programmers that
 do actually understand low-level issues and don't screw things up with any
 idiotic "object model" crap.
 
 So I'm sorry, but for something like git, where efficiency was a primary
 objective, the "advantages" of C++ is just a huge mistake. The fact that
 we also piss off people who cannot see that is just a big additional
 advantage.
 
 If you want a VCS that is written in C++, go play with Monotone. Really.
 They use a "real database". They use "nice object-oriented libraries".
 They use "nice C++ abstractions". And quite frankly, as a result of all
 these design decisions that sound so appealing to some CS people, the end
 result is a horrible and unmaintainable mess.
 
 But I'm sure you'd like it more than git.

Name: Anonymous 2009-03-13 19:20

>>63
EXPERT LINUX PASTA-ER

Name: Anonymous 2009-03-13 19:47

C++ has OOP, C doesn't. How do C programmers manage to create complex programs without it? 訓えて、先生たち!

Name: Anonymous 2009-03-13 19:48

>>65
Terrible!

Name: pervise.zhao 2009-03-13 19:57

>>65
OIOIC is a completely new object-oriented mechanism for the C programming language.

Using OIOIC, you can describe the flower, birds, grass, insects, trees, houses ...
Using OIOIC, you can describe the elements, atoms, protons, electrons ...
Using OIOIC, you can describe the earth, the sun, the Milky Way galaxy, collapsar ...
Using OIOIC, you can describe ...

1. OIOIC perfectly supplies the gap of object-oriented technology for the C programming language;
2. OIOIC perfectly solved the multiple inheritance problem in the Software World;
3. OIOIC perfectly objectivizes multithreading access control of object;
4. OIOIC unifies the norm of components in the Software World;
5. OIOIC unifies the structure of code tree in the Software World;
6. OIOIC unifies the thinking of object-oriented programming in the Software World;
7. OIOIC unifies all advanced programming languages in the Software World, to make the C programming language as the preferred.

For further information, please download the "OIOIC-Primer-2nd-Edition-English.tar.gz". (the English version of << OIOIC Primer >> )
http://code.google.com/p/oioic/downloads/list

Welcome your advice!

Name: Anonymous 2009-03-13 19:57

>>65
-10/10

Name: David Bowie Meme Fan !Wlvt8BzHC2 2009-03-13 20:09

>>65
Technically, you could "program" OOP into C, by using a table of function pointers to represent your virtual methods. You then "hotswap" your overridden methods in and out of this table for different subclasses. In fact, this is how it works in C++, though all of this skullduggery is hidden from you.

Name: Anonymous 2009-03-14 7:57

>>68
No, I'm serious. I never really programmed anything complex in C (or C++), but OO seems like a big asset to me.

Name: Anonymous 2009-03-14 8:20

>>70 see >>69
Several OO languages (like python) are programmed in C, how do you suppose they were able to do that if OO wasn't possible in C.
OO != classes

Name: Anonymous 2009-03-14 8:20

>>70
GIVE UP PROGRAMMING RIGHT NOW

Name: Anonymous 2009-03-14 8:27

unoptimized

Name: Anonymous 2009-03-14 8:31

>>72
Don't  make me cry ;_;

Name: Anonymous 2009-03-14 9:02

>>74
Don't worry about it. There is a massive problem with people here that lack general sophistication. Sometimes, these people hastily generalize their negative experiences and sometimes, they just lack eloquence to express themselves. Other times, they're just trolls baiting for shit.

Name: Anonymous 2009-03-14 14:51

like[row*rowlength+column] that, which becomes annoying as fuck when you have to type it over and over again, especially for higher dimensions. Fucking despicable.

#include <valarray>
#include <iostream>
#include <algorithm>
#include <iterator>
#include <numeric>

int main()
{
    using namespace std;
    const size_t row_count = 100, col_count = 33;
    valarray<int> matrix(1, row_count*col_count);
    partial_sum(&matrix[0], &matrix[matrix.size()], &matrix[0]);

    size_t row_nr = 55, col_nr = 10;
    matrix[row_nr*col_count + col_nr] = 666;

    valarray<int> row(matrix[slice(row_nr * col_count, col_count, 1)]);
    valarray<int> column(matrix[slice(col_nr, row_count, col_count)]);

    ostream_iterator<int> anus(cout, "\n");
    copy(&row[0], &row[row.size()], anus);
    cout << '\n';
    copy(&column[0], &column[column.size()], anus);
 
    return 0;
}


Look ma! No loops!

Name: Anonymous 2009-03-14 15:12

>>76 here
Oh, and one thing before I get raped to death. I do computational physics. The abstractions Sepples gives me are ESSENTIAL but they don't incur a measurable performance hit relative to other languages. Simulated dynamic binding is an example of a pattern which had saved me a considerable amount of development time without a significant performance hit. Functional programming with templates is another.

I'd really like a language which would give me those features with the performance of Sepples but without the pain.

Name: Anonymous 2009-03-14 15:37

>>77
Why the fuck are you using C++ for that?  I'm surprised an idiot like you has a job (unless you are just doing it at your home for yourself, seeing as you are stupid enough to be using C++ for that.)  Python is infinitely more suited for that type of programming.

Name: Anonymous 2009-03-14 15:40

>>77
I'd really like a language which would give me those features with the performance of Sepples but without the pain.
Read YAHT

Name: Anonymous 2009-03-14 15:41

>>79
Read YHBT

Name: Anonymous 2009-03-14 16:23

>>78
Your troll attempt is irrelevant. I am doing distributed computing. I'm going to benchmark some algorithms on a cluster and I'm planning to do a C++ vs C implementation benchmark along with it.

>>80
How about no.

Name: Anonymous 2009-03-14 16:48

Name: Anonymous 2009-03-14 16:53

I lol'd at doing computational physics with sepples. What next, writing 3D games in brainfuck?

Name: Anonymous 2009-03-14 17:03

>>83
That comment has greatly angered the International Union Of Brainfuck Game Programmers

Name: Anonymous 2009-03-14 17:06

Name: Anonymous 2009-03-14 17:13

>>83
You might be surprised but Sepples is considered an improvement because everything to date has been written in FORTRAN. IINBDFI.

Name: Anonymous 2009-03-14 17:17

>>86
Aren't the FORTRAN math libraries fast and thoroughly debugged? While the language is a fucking wreck, don't you still use these?

Name: Anonymous 2011-01-31 21:14

<-- check em dubz

Name: tray 2012-03-14 17:18

you better be

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