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

Pages: 1-4041-

C++11: The Downfall of C

Name: Anonymous 2012-07-10 0:25

Now that C++11 is beginning to appear in popular compilers, C is becoming less relevant. C is now useful only to kernel writers and embedded systems programmers. You will not achieve employment with C as long as C++11 exists.

Prepare your anus.

Name: Anonymous 2012-07-10 0:36

I agree, although C++ can and is widely used in embedded systems.

Name: Anonymous 2012-07-10 0:47

If anything will make C obsolete it is Go (C with garbage collection). Its only a matter of time before D makes C++ obsolete as programmers realise that having to manuallyt manage memory in C++ is a waste of time

Name: Anonymous 2012-07-10 1:02

>>3
having to manuallyt manage memory in C++ is a waste of time

- There are many third party garbage collectors for C++.

- These GCs are rarely used because RAII is more efficient than GC and easy to use.

- Smart pointers are now standard in the C++11 STL, although Boost has had them for a decade. In particular shared_ptr uses reference counting to avoid the need to explicitly delete. For 90% of code where the STL is permitted, you can get away with always using shared_ptr.

- Valgrind, Dr. Memory, and countless other tools make it very difficult to mess up memory management.

Name: Anonymous 2012-07-10 1:26

>>4
thanks for reminding me how much I hate trying to make C++ safe and motivating me to use D

Name: Anonymous 2012-07-10 1:45

>>5
Enjoy being unemployed.

Name: Anonymous 2012-07-10 1:49

>>5
I'll let this speak for itself.
http://stackoverflow.com/a/1059780

Name: Anonymous 2012-07-10 2:24

>>7
thats a pretty lame ass attempt to shoot down D:
Unicode is dealt with in a somewhat strange way - there are three different unicode string types: char[], wchar[] and dchar[] - the standard is char[]
boo hoo, sry you dont like unicode

>Arrays are strange. Some are static, some are dynamic.
as opposed to what? C++ arrays that are static pointers? having to turn arrays into objects so you can make them dynamic in C++?

Arrays are not regular objects
see above, enjoy your buffer overflows with regular non-bounds checked arrays in C++

You can sometimes call methods without the parens.
ooooh, thats a deal breaker

Functions that form closures or are attached to objects (i.e. methods) are not the same as regular functions, instead they are called delegates, and you must be aware of the differences.
seriously, this is a ~bad~ part of D compared to C++?

>Literal strings (char[]) can be defined with x"40fe", to specify the bytes in hexadecimal that make up the utf-8 array. The D website says that specifying an illegal utf-8 sequence is allowed, but my compiler disagrees.
boo hoo, compare that to how C++ handles utf-8

Im not going to go through the rest, you get the idea, its pretty pathetic to see C++ programmers try to shoot down D especially when the only way to make C++ more dynamic is on top of generics bullshit

Name: Anonymous 2012-07-10 2:33

>>8
YHBT

Name: Anonymous 2012-07-10 2:48

Function pointers are like in C, delegates have an additional context pointer
Oh, just terrible!

It is really hard to google for things relating to a language called "D"
Javatard detected. All I needed was C:\D\dmd2\html\d\index.html

Name: Anonymous 2012-07-10 3:49

>>6
enjoy going out of business.

Name: Anonymous 2012-07-10 4:45

Lambdas have really made C++ shine as a language

Name: Anonymous 2012-07-10 14:13

>>5
Really? It's not that hard to design and/or use thread/exception/leak safe interfaces in C++. D is unnecessary if your only concern is safety. C++ by default is unsafe, but it gives you the tools to easily switch to a safe design if you're at least an intermediate.

Name: Anonymous 2012-07-10 14:22

Literally everything in D is also possible with C++. Sure, maybe one feature here or there is better than C++, but there's no major compelling reason for the world to switch.

Also Walter Bright's D compiler is written in C++.

Name: Anonymous 2012-07-10 14:25

It's not that hard to design and/or use thread/exception/leak safe interfaces in C++.
then why arent there any books that teach how to program 'safe C++'? You cant teach safe C/C++ for the same reason you cant teach safe OS systems administration, its something you can only learn with experience. The fact is there is no cookie-cutter method for making safe C++ code, you simply have to have a deep understanding of low level architecture, assembly, OS and libs, etc, everything a CS student would be expected to know. Which is why only CS graduates are the ones who like and are able to use C/C++ safely. After many wasted years of trying to learn C/C++ Ive realized all that time is wasted, I could have used D and gotten the exact same results as far as speed and low memory use. The things that C/C++ offer is of very little use to the average applications programmer.

Name: Anonymous 2012-07-10 15:03

>>15
to further this point: the only thing that C/C++ gives you is control, you have much more direct control of how the compiler interprets bytes in C/C++ than any other languagge. But that control comes at a cost of diligence, the programmer is expected to watch over things that the compiler would normally control in other languages. This is hard to do and is why that coding standards are put in place in places like MS to try and keep all the dangers of buffer overflows in check. But its a losing battle, eventually people are going to use D and Go more instead of fighting to control C/C++. I predict that as soon as a AAA game studio produces a major 3D game in D, that will kill C++'s percieved advantage and relegate C/C++ to systems programming forever

Name: Anonymous 2012-07-10 16:01

>>15
No.
Stroustrup, Alexandrescu and Meyer's Effective C++ books.

The only kind of experience people need is “think before type”.

Name: Anonymous 2012-07-10 16:46

>>4
- These GCs are rarely used because RAII is more efficient than GC and easy to use.
[citation needed]

Name: Anonymous 2012-07-10 17:37

>>15-16
.NET fag detected

Name: Anonymous 2012-07-10 18:22

>>19
nope, I dont use VM languages, surprise, you can get garbage collection with compiled languages

Name: Anonymous 2012-07-10 18:54

I predict that as soon as a AAA game studio produces a major 3D game in D, that will kill C++'s percieved advantage and relegate C/C++ to systems programming forever

D is an experimental language. No one will use it for production. It's for open sores shitcode until Intel and Microsoft make compilers for it.

Name: Anonymous 2012-07-10 22:20

dubs get

Name: Anonymous 2012-07-11 0:35

C++11 should be used for kernels too. C is only relevant for embedded programming.

Name: Anonymous 2012-07-11 2:48

[quote]C++11 should be used for kernels too. C is only relevant for embedded programming.[/quote]
Linus Torvald once said in an email that he tried to use sepples in the kernel before, but then he realized everything quickly turned into shit.

Name: Anonymous 2012-07-11 2:57

>>24
oh boy, like we havent seen that 'email' a thousand times before, why dont you post a link of it so we can all admire Linus's keen insight

Name: Anonymous 2012-07-11 4:57

>>23
So the kernel should include the entire C++ runtime, including RTTI, cxxabi and the like? Now for an even more fun question: are you gonna use the C ABI for module loading?
If you're writing a microkernel, that's gonna be one huge microkernel

Name: Anonymous 2012-07-11 5:05

>>26
A microkernel should be so small that it should be ok to do it in C++.

Name: Anonymous 2012-07-11 13:13

>>26
I dont know why you are making a big thing about an ABI, an OS is bare metal systems programming, an OS does not run on an OS. The Linux kernel has its own object system, which is kind of funny considering that Linus's only legitimate gripe about C++ is depending on high level abstractions that cant be removed, yet he himself creates such abstractions from scratch in C. One OS that does use C++ is Symbian, and considering that Symbian is an extremely light weight OS meant to run on extremely low power hardware proves that C++ is up to the job.

Name: Anonymous 2012-07-11 13:20

"Manually manage memory" is a clever troll which you might or might not realize.

When do you have to manage memory if it is not dynamic and when is physical memory available dynamic in a production server at runtime? That's never. So it is a non issue. A buyer hoarding system out of your control, in what way is that your problem? Cargo cult programming, that's what it is. Completely useless and very harmful.

All you got from this useless cargo cult programming was a world wide distribution of systems that are unable to answer simple questions such as, "how many X can be processed in a period of Y".

Really, take any system, why not 4chan as an example. What are the limits? You'll get nothing but estimates as answers because they are unknown due to non existing limits!

This is useless in a business world, which pays your bills, if there are systems available that actually can answer these questions. Systems that comes with a guarantee that, you'll get what you pay for period, nothing more and nothing less. Neither the buyer or the seller have any doubts, X of these and Z of that. Easily accomplished by either system profiling at startup or configs, memory benchmarks at startup and heap allocation. If performance is not guaranteed as determined by benchmarks, log and fail, blaim the buyer for misuse - cash in support.

Seriously, name one bill paying use for dynamic memory usage and where it counts. If none, why aren't you learning how to do without it?

That's just my cents, from the lead developer of a system that currently rapes competing systems around the world...

Name: Anonymous 2012-07-11 14:15

>>28
Linus's only legitimate gripe about C++ is depending on high level abstractions that cant be removed, yet he himself creates such abstractions from scratch in C
That's common among C and "C+" programmers. For example, they complain that templates produce executable bloat, but they end up bloating it manually with new functions for every type or worse, massive preprocessor blocks.

Name: Anonymous 2012-07-12 17:46

>>29
Are you honestly saying there isn't a need for dynamic memory?

Name: Anonymous 2012-07-12 18:42

How about this: C/C+/C++ are fucking shit.

Name: Anonymous 2012-07-12 20:38

>>31
I think he's saying something akin to "every program has an obvious ceiling that is defined by the task it is designed to perform within the constraints it is designed to respect within a degree of performance it is expected to represent."

Name: Anonymous 2012-07-12 22:50

|"Manually manage memory"

java faggot detected. lets hur dur with GC

Name: Anonymous 2012-07-13 1:03

>>34
|
|| |B | 

Name: Anonymous 2012-07-13 6:46

ITT: bashing Torvalds to make their little sepples feel better.

Name: Anonymous 2012-07-13 7:59

>>23
That's the shittiest idea I've ever heard on /prog/

Name: Anonymous 2012-07-13 12:10

>>32
What the fuck is C+?

Name: Anonymous 2012-07-13 13:04

>>38
More than C, less than C++.

Name: Anonymous 2012-07-13 13:04

>>38
Ask tdavis.

Name: Anonymous 2012-07-13 13:14

Thread today:
C++11: The Downfall of C
Thread from next year:
[insert]: The Downfall of C
Thread, five years later:
[insert]: The Downfall of C

Name: Anonymous 2012-07-13 13:24

>>51
In five years we will all be using LoseThos, the only CIA-backdoor-free OS.

Name: Anonymous 2012-07-13 14:39

>>42
...which was developed on Windows.

Name: Anonymous 2012-07-13 15:24

>>43
Windows is actually a pretty capable OS. Don't even mention supercomputers or headless servers as though that is any mark against Windows in its preferred use case.

Name: Anonymous 2012-07-13 16:17

>>44
It's non-free, sonny.  Can you really trust a US-based company?

Name: Anonymous 2012-07-13 16:45

>>45
It's non-free, sonny.  Can you really trust a US-based company?
1. I don't care I can afford it.
2. I trust only US-based companies.

Name: Anonymous 2012-07-13 17:37

>>46
1. That's not what ,,non-free'' is about, sonny.  It's about freedom.
2. You are either trolling or severely misguided.

Name: Anonymous 2012-07-13 17:43

>>47
And you are either a Chinese citizen or a commie.

Name: Anonymous 2012-07-13 17:48

>>42
the only CIA-backdoor-free OS.
confirmed for tinfoil hat neckbeard basement dweller. you have no idea what OS security is or how it is maintained. you think a toy OS made by a fellow neckbeard makes you impervious to security threats

we got sweating white trash fail going on here

Name: Anonymous 2012-07-13 17:51

>>48
Neither.  Also, your McCarthyist stupidity is showing.

>>49
http://www.wikihow.com/Detect-Sarcasm-in-Writing

Name: Anonymous 2012-07-13 18:09

>>47
saging this

Name: Anonymous 2012-07-13 18:20

>>51
bumping because you're a fucking retard

Name: Anonymous 2012-07-13 19:20

>>50
Sarcasm in writing is difficult to understand because it is ambiguous.

Name: Anonymous 2012-07-13 19:36

>>53
And then there's Poe's law...

Name: Anonymous 2012-07-14 5:35

>>31

It is not necessary, but a need? When do you need to use dynamic allocation? To allocate memory for a popup dialog that says memory allocation failed? I bet you do allocate memory for dialogs, am I right? That's only a need to make up for shoddy programming skills and that's ok with me, as long it's not me doing it. Maybe another examples calls for dynamic allocation. Let's say you open 25000 images in photoshop, oh no, bad example...it would be better if photoshop limited the amount of memory to use by a setting, I wouldn't want to know what would happen if photoshop tries to 25K images, would it crash, would my unsaved work be saved?

Your turn, give an example where it is a good idea.

Name: Anonymous 2012-07-14 8:27

One moment a chunk of ram can be a cudder, next it can be a 2hu.
~ ~ The miracles of computer science in a modern age ~ ~

Name: Anonymous 2012-07-14 8:38

>>55
I used to use QBASIC too.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-07-14 8:40

>>55
Dynamic allocation is for when you do not know in advance how much memory to allocate.

Name: Anonymous 2012-07-14 10:07

>>58
How's Anonix coming along, Cooter?

Name: Anonymous 2012-07-14 10:26

>>58

That's a bad reason, if you can not know how much resources that will be needed in theory (as in it's impossible), you should at least limit any hoarding of resources to sensical limits. If not, your little app could swap out the entire system. Still lazy, you should rather let it be configurable by the user. Then if doing that then it makes sense to allocate it all on the heap directly and make sure it's locked in physical memory, to guarantee that the resources a user has configured your program to handle, actually has been acquired and can be used.

Name: Anonymous 2012-07-14 12:57

>>26
The most important L4 implementations are written in C++.

Name: Anonymous 2012-07-14 13:32

>>60

but the application should be able to adapt to the memory constraint of any host machine, rather than be specialized for one.

Name: Anonymous 2012-07-14 14:18

>>55
There are too many cases where you need dynamic memory allocation/freeing. Let's say you need to load a resource into memory, do something with it, and then remove it from memory. Use your fucking imagination. Sage.

Name: Anonymous 2012-07-14 14:24

>>55
web browser.

Name: Anonymous 2012-07-14 15:22

>>63
Sage.
You sure showed him.

Name: Anonymous 2012-07-14 15:58

>>65
check my doubles, then back to the imageboards with you.

Name: Anonymous 2012-07-14 16:45

>>66
lol epic fail

Name: C++ a shit 2012-07-14 21:11

If this thread was supposed to make SEPPLES look good it kinda failed.

Name: OP 2012-07-14 21:50

>>68
I use Lisp.

Name: Anonymous 2012-07-14 22:11

>>69
if you wrote your own reader macro you can stay.

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