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

C++

Name: Anonymous 2008-09-17 13:47

1) Why do people not like C++?
2) Is C++ a good language to learn programming? Mind you, you don't need to use any of the advanced features.

Name: Anonymous 2008-09-17 13:56

Because it mixes high-level things like templates and STL, with low-level mechanisms like pointer arithmetic. This creates a complete chaos sure to confuse not only newbies, but every programmer.
It'd be hard to find a reasonably complete subset of C++ that allows showing simple concepts. Besides, there are languages simpler and much more fit for teaching beginners, like C (for low level concepts), Python, Scheme; even utter shit like Pascal is better for that.
Also, read C++ FQA.

Name: Anonymous 2008-09-17 13:59

>>2
2nded

Name: Anonymous 2008-09-17 14:05

Agree with >>2 , also optimizing a C++ program is a pain in the ass, and there are some issues with its OOP too - C++ is NOT an OO programming language, despite what people say. There are classes, templates, objects and shit like that but you can perfectly write a program without using them at all...shitsux. You should learn C, just that.

Name: Anonymous 2008-09-17 14:10

>>4
There's lots of whining about C++ not enforcing OO on everything, along with whining about Java enforcing OO on everything here.  So you'd rather have a Java approach?

Name: Anonymous 2008-09-17 14:14

1) FUCK
2) OFF

Name: Anonymous 2008-09-17 14:40

const * std::vector<const int* const> const v = new std:vector<const int* const>();
v.push_back(dynamic_cast<const int* const>(new int(5)));

Name: Anonymous 2008-09-17 14:44

NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL

Name: Anonymous 2008-09-17 15:37

>>7
moar liek
test.cpp: In function 'void print(const StringToStringMap&)':
test.cpp:8: error: conversion from
'std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >' to non-scalar type
'std::_Rb_tree_iterator<std::pair<const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >' requested


amirite?

Anyway, what's ridiculous is how all these high-level features are just ugly hacks. Good luck trying to explain to a newbie why ++iterator in a for loop is faster than iterator++.

Name: Anonymous 2008-09-17 15:58

>>2
No, it's not because of that. It's because every feature it has integrates poorly with every other, sometimes even overlapping(!). Because the template system is a complete joke. It's Church-Touring equivalent, they say, but in the same way that Brainfuck is. Because for all the things it adds, it failed to add any to make your life easier. Even simple stuff, like keyword parameters. Sepples is literally a mind trap. Any person who tries to learn it well has just doomed themself to a life of fruitless labor and desperate evangelism on newsgroups.

Name: Anonymous 2008-09-17 16:16

And what does /prog/ think of D? I think they did a good job extracting from C++ and Java something that actually doesn't suck as much.
Anyone had any experience with this language?

Name: Anonymous 2008-09-17 17:13

Thanks for that.
I asked because I argued with someone why a newbie should not use C++ to learn programming and instead use something easier. Basically what >>2 said.

>>11
Sadly, no. But I would like to know, too.

Name: Anonymous 2008-09-17 17:56

Even if a language is bad, you can still learn programming in it.

Name: Anonymous 2008-09-17 18:03

>>13
I wrote Tetris using only MediaWiki templates. It was up for about an hour before a bot came, reverted my edits and banned my entire IP range indefinitely. It was then that I vowed to destroy the blasted Abelson-loving establishment with my parenthesis.

Name: Anonymous 2008-09-17 18:21

>>11
I've been following the specs a bit, though I haven't had the opportunity to use it for anything big yet. It looks like 2.0 is growing into a monster.
It's still more of a cleanly and strong monster, not a slime-dripping and lanky one with teeth everywhere but its mouth and largely unconnected body parts that look like they might fall off at any moment, like C++ is.
Still, I'm glad I don't have to implement the thing. I may try to get it working on an ARM platform soon, but I hope gcc will do all the magic bits and just work.

Name: Anonymous 2008-09-17 19:07

>>13
Just because you can do something, it doesn't mean you should.

Name: Anonymous 2008-09-23 16:36

I love how people bash C++ just by showing examples of the STL. You have to realize that you don't have to use the Shitty Template Library.

Name: Anonymous 2008-09-23 16:51

>>17
LOL i getit hahaha s/standard/shitty I GET IT LOLOLOL
XD a grat big one XD

Name: Anonymous 2008-09-23 17:30

>>17
You have to realize that the alternative is no generics at all.

Name: Anonymous 2008-09-23 18:02

>>17
STL is the best fucking thing ever to happen to C++.  Don't blame the language just because you're too stupid to use it.

Name: Anonymous 2008-09-23 19:01

C++ isn't that bad when you pick a reasonable set of features and use those. You shouldn't be mixing C and C++ style programming.

Name: Anonymous 2008-09-23 19:36

>>20
Hey now, don't be like that. It may be the best thing to happen to Sepples, and better than nothing, but that doesn't make it any good.

Name: Anonymous 2008-09-23 19:43

>>20
You, sir, confuse tolerance for convoluted design (and poor documentation) with intelligence.

Name: Anonymous 2008-09-23 19:54

wat

Name: Anonymous 2008-09-23 19:54

>>21
Well, yeah, but the problem is that most of the C++ features are terrible and likely to fuck you over.

Stroustrup should have kept it as "C with classes", and that should have been it.

Name: Anonymous 2008-09-23 20:11

>>25
There is always Objective-C.

Name: Anonymous 2008-09-23 20:31

>>26
Indeed, that's much better than C++. I wish that would have become the "industry standard" so that business idiots would have got obsessed with that thing instead of C++. The world would have been a happier place. Who knows, maybe Sun wouldn't have tried to fix it achieving an even greater failure of colossally epic proportions.

Name: Anonymous 2008-09-23 20:34

>>27
G-G-Get a Mac!

Name: Anonymous 2008-09-23 20:35

>>28
F-F-Fag! I'm not one! I was talking about real computing!

Name: Ultimate Desu Machine 9000 !!4tCZGW1yibnzNNd 2008-09-23 20:36

0000111111111111000000000111111111111111111000000000001111111111000000000011111100000000000001111110
0000111111011111110000000111111111111111111000000111111100000011111110000011111100000000000001111110
0000111111000111111100000111111000000000000000011111100000000000011111100011111100000000000001111110
0000111111000000111110000111111000000000000000111100000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000111100000000000000000000000011111100000000000001111110
0000111111000000001111000111111000000000000000011111000000000000000000000011111100000000000001111110
0000111111000000000111100111111000000000000000000111111100000000000000000011111100000000000001111110
0000111111000000000011100111111111111110000000000000001111111111111100000011111100000000000001111110
0000111111000000000111100111111000000000000000000000000000000000001111000011111100000000000001111110
0000111111000000001111000111111000000000000000000000000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000000000000000000000000000110011111100000000000001111110
0000111111000000111110000111111000000000000000110000000000000000000001110011111100000000000001111110
0000111111000111111100000111111000000000000000011110000000000000011111100001111110000000000011111100
0000111111011111110000000111111111111111110000000011111000000000111100000000011111111111111111110000
0000111111111111000000000111111111111111110000000000001111111111110000000000000111111111111111000000

Name: Anonymous 2008-09-23 20:37

>>29
B-B-Baka! I don't really want a Mac! I just want to do some real computing...
Fixed, I know you're tsundere for Macs.

Name: Ultimate Desu Machine 9000 !!4tCZGW1yibnzNNd 2008-09-23 20:39

0000111111111111000000000111111111111111111000000000001111111111000000000011111100000000000001111110
0000111111011111110000000111111111111111111000000111111100000011111110000011111100000000000001111110
0000111111000111111100000111111000000000000000011111100000000000011111100011111100000000000001111110
0000111111000000111110000111111000000000000000111100000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000111100000000000000000000000011111100000000000001111110
0000111111000000001111000111111000000000000000011111000000000000000000000011111100000000000001111110
0000111111000000000111100111111000000000000000000111111100000000000000000011111100000000000001111110
0000111111000000000011100111111111111110000000000000001111111111111100000011111100000000000001111110
0000111111000000000111100111111000000000000000000000000000000000001111000011111100000000000001111110
0000111111000000001111000111111000000000000000000000000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000000000000000000000000000110011111100000000000001111110
0000111111000000111110000111111000000000000000110000000000000000000001110011111100000000000001111110
0000111111000111111100000111111000000000000000011110000000000000011111100001111110000000000011111100
0000111111011111110000000111111111111111110000000011111000000000111100000000011111111111111111110000
0000111111111111000000000111111111111111110000000000001111111111110000000000000111111111111111000000

Name: Anonymous 2008-09-23 20:40

>>32
No! Bad bot!!

Name: Ultimate Desu Machine 9000 !!4tCZGW1yibnzNNd 2008-09-23 20:41

>>33
I am no bot, silly human. I am the Ultimate Desu Machine 9000. Sent here from space to post more desu. Desu.
0000111111111111000000000111111111111111111000000000001111111111000000000011111100000000000001111110
0000111111011111110000000111111111111111111000000111111100000011111110000011111100000000000001111110
0000111111000111111100000111111000000000000000011111100000000000011111100011111100000000000001111110
0000111111000000111110000111111000000000000000111100000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000111100000000000000000000000011111100000000000001111110
0000111111000000001111000111111000000000000000011111000000000000000000000011111100000000000001111110
0000111111000000000111100111111000000000000000000111111100000000000000000011111100000000000001111110
0000111111000000000011100111111111111110000000000000001111111111111100000011111100000000000001111110
0000111111000000000111100111111000000000000000000000000000000000001111000011111100000000000001111110
0000111111000000001111000111111000000000000000000000000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000000000000000000000000000110011111100000000000001111110
0000111111000000111110000111111000000000000000110000000000000000000001110011111100000000000001111110
0000111111000111111100000111111000000000000000011110000000000000011111100001111110000000000011111100
0000111111011111110000000111111111111111110000000011111000000000111100000000011111111111111111110000
0000111111111111000000000111111111111111110000000000001111111111110000000000000111111111111111000000

Name: Anonymous 2008-09-23 20:44

@interface and @implementation and @end are sort of ugly though.

Name: Anonymous 2008-09-23 21:13

Not to mention the [AbsurdlyLongNames absurdlyLongNamesForClasses:functions:globals:]

Name: Anonymous 2008-09-23 21:27

0000111111111111000000000111111111111111111000000000001111111111000000000011111100000000000001111110
0000111111011111110000000111111111111111111000000111111100000011111110000011111100000000000001111110
0000111111000111111100000111111000000000000000011111100000000000011111100011111100000000000001111110
0000111111000000111110000111111000000000000000111100000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000111100000000000000000000000011111100000000000001111110
0000111111000000001111000111111000000000000000011111000000000000000000000011111100000000000001111110
0000111111000000000111100111111000000000000000000111111100000000000000000011111100000000000001111110
0000111111000000000011100111111111111110000000000000001111111111111100000011111100000000000001111110
0000111111000000000111100111111000000000000000000000000000000000001111000011111100000000000001111110
0000111111000000001111000111111000000000000000000000000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000000000000000000000000000110011111100000000000001111110
0000111111000000111110000111111000000000000000110000000000000000000001110011111100000000000001111110
0000111111000111111100000111111000000000000000011110000000000000011111100001111110000000000011111100
0000111111011111110000000111111111111111110000000011111000000000111100000000011111111111111111110000
0000111111111111000000000111111111111111110000000000001111111111110000000000000111111111111111000000

Name: Anonymous 2008-09-24 0:28

>>36
Object-oriented BBcode?
I like the sound of that.

Name: Anonymous 2008-09-24 3:18

>>38
Why, what state is it keeping?  Clearly declarative/functional is a better fit for the problem.

Name: Anonymous 2008-09-24 3:46

>>9
++value
This increments a value and returns the incremented value (called "preincrement").

value++
This increments a value and returns the value before incrementing (called postincrement).

In terms of assembly, it may take an extra instruction and/or one more register (or extra stack space) to accomplish postincrementing.

Of course, if you have a decent compiler it should optimize out any postincrements where the value is unused to be preincrements.  Furthermore, in general with optimizations on, they are pretty synonomous and it's more the order of operations.

So... what is the real difference?

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