Live data from Hacker News

C++11 Makes Competitors Go Rusty

nerds-central.blogspot.com

41–50 of 69 posts

Re: C++11 Makes Competitors Go Rusty

#41
post #11

I like and use C++. It fits my requirements of allowing high performance but still having rich abstractions. I also like most of the additions in C++11, and I look forward to using them. But, there is a valid argument for using a newer language that has nothing to do with the language itself: the ancient include, compile and link process. Having to do the #ifndef/#define/#endif dance in every header file I write is a…

While I understand the historical context behind wanting to maintain the ability to link to C code, I personally think that keeping the C include and link process was one of the more bat-shit insane things they did with the C++ language. It was an outdated concept when C++ was made and they should have had the courage to do better. Plenty of languages can interface with C without requiring the same brain-dead build cycle.

Re: C++11 Makes Competitors Go Rusty

#42
post #17

As soon as he said "both Google and Mozilla have been playing the 'new object oriented native language' game recently" , I stopped reading. If you aren't sufficiently familiar with either language to know that neither of them is particularly object oriented, at least in the traditional sense, then you probably shouldn't be writing about them.

I agree that this paragraph is badly worded but the rest of the article hardly deals with anything related. There are some valid issues here that have nothing to do with the programming paradigm advocated and supported by either language.

Re: C++11 Makes Competitors Go Rusty

#43

How many people here who complain about the language being too complicated have actually been harmed by the presence of features in the language? If you want an advanced programming language, it's going to be complicated. Without garbage collection, it will be even more complicated. Almost every feature that exists in C++ exists for a reason, and every one that was added or removed in C++11 was added or removed for g…

I would think that anyone who has coded C++ in teams and/or working with other people's APIs would be instantly familiar with why too many features in the language are harmful.

I had an instance where someone overloaded the new operator which confused the hell out of the team (parenthesis overloading caused a similar issue).

Another instance was a grad developer 'updating' a system to use templates so that (a) no-one else in the team understood how to use it (b) it (predictably) broke, yielding half a page of compilation errors that no-one including it's author understood and (c) slowed the compilation process down to a crawl.

Another instance (repeated in dozens of similar contexts) was sharing code with other teams where we had used C++ as an OO language and they had used it as a procedural / faux-functional language and trying to make these incompatible styles mix.

Other cases are pretty much any one of the major C++ systems that tend to work 90% of the time but you need to know why and when they don't. These cases are legion.

Programming languages don't have to be complex. C is simple. Java is simple. Lisp is simple. Each of those languages can be pretty damn powerful.

Re: C++11 Makes Competitors Go Rusty

#44

I have fun when I write code with Go. I love the syntax, type inference and standard libraries. I wrote a transcoding video http server with html frontend in like a hundred lines of code and it doesn't make my eyes bleed. I don't think Go needs to replace C++ but I certainly prefer it. I think there are tons of uses for C++ still obviously (least of which is Go's GC-nature), but I don't think C++11 makes redundant th…

If only it supported a platform my clients actually use.

Re: C++11 Makes Competitors Go Rusty

#45

I have fun when I write code with Go. I love the syntax, type inference and standard libraries. I wrote a transcoding video http server with html frontend in like a hundred lines of code and it doesn't make my eyes bleed. I don't think Go needs to replace C++ but I certainly prefer it. I think there are tons of uses for C++ still obviously (least of which is Go's GC-nature), but I don't think C++11 makes redundant th…

If only it supported a platform my clients actually use.

I assume you mean Windows?

http://code.google.com/p/go-wiki/wiki/WindowsSupport

Builds track weekly and with Go 1 coming up, it's a moot issue anyhow.

Re: C++11 Makes Competitors Go Rusty

#46

Earlier quoted context omitted.

If only it supported a platform my clients actually use.

I assume you mean Windows? http://code.google.com/p/go-wiki/wiki/WindowsSupport Builds track weekly and with Go 1 coming up, it's a moot issue anyhow.

I was more thinking iOS and Android. Though I haven't investigated weather or not it could use the NDK.

Re: C++11 Makes Competitors Go Rusty

#47

Earlier quoted context omitted.

I assume you mean Windows? http://code.google.com/p/go-wiki/wiki/WindowsSupport Builds track weekly and with Go 1 coming up, it's a moot issue anyhow.

I was more thinking iOS and Android. Though I haven't investigated weather or not it could use the NDK.

Ah, my mistake. I know that you can build ARM binaries with Go, you ought to be able to invoke those from the NDK.

/r/golang had a link to this a while back, re: Go on iOS: https://groups.google.com/group/golang-dev/browse_thread/thr...

Looks like the iOS port requires a bit of work on cgo support for arm/linux before a proper iOS app can be made. Without the cgo shim it seems the app can't run more than 10 seconds, though the benchmarks are quite good.

Re: C++11 Makes Competitors Go Rusty

#48
post #8

Your freaking enormous ball of mud accreted some more mud. Quelle surprise . It's probably doing it by sheer gravitational attraction at this point. I do not think that removes the need for languages that have the capabilities of C++, yet aren't freaking enormous balls of mud. The reader may mentally replace my use of the word "freaking" with other choice terms at his or her discretion.

Any useful language is a freaking enormous ball of mud. Bjarne said: there are only two kinds of languages - the ones people complain about and the ones nobody uses.

I can't remember the source, but I'm sure I read somewhere that programming languages are either too large or too small...

Re: C++11 Makes Competitors Go Rusty

#49

How many people here who complain about the language being too complicated have actually been harmed by the presence of features in the language? If you want an advanced programming language, it's going to be complicated. Without garbage collection, it will be even more complicated. Almost every feature that exists in C++ exists for a reason, and every one that was added or removed in C++11 was added or removed for g…

Can I just trade in my exceptions for Maybe or Either? It's already possible to do both of these things, the trouble is that I have to use other people's code that uses exceptions.

Except the C++ dragon rears its head. How do you build an intelligent Maybe or Either type in C++? Should they be value types containing unions? You can’t use “non-trivial” types in unions till C++11, and a lot of people haven’t yet upgraded. Referential types with dynamic allocation? How do you transfer ownership? Are “Left” and “Right” subtypes of “Either”? It’s ridiculous.

Re: C++11 Makes Competitors Go Rusty

#50

Compatibility: The new language will have to talk with older languages. Types will have to be translated; memory models will need to be aligned and compilers will need to 'play nice' together. This is not just as the compiled object level but at the ABI level during linking etc. I've spent more time solving issues with memory models in C++ than I have in any other language because C++ has no ABI - I've had patches to…

I'd like to upvote twice, but it wouldn't let me.

So it's cruel, but I usually secretly assume that people who keenly advocate C++ are just poseurs.

Anybody who has actually gone through the whole process of making a program in C++ and fixing enough of the bugs in it that somebody can put it in a box and sell it in the shops, is appropriately circumspect in their recommendations, because they know just how appallingly awful it can get.

So awful, that you'd give up on exceptions, DLLs, new & delete, templates, STL, auto-registering static globals, and all that kind of stuff - because it's actually EASIER to give up all those time-saving modern conveniences, than it is to pick up the pieces after they've been overused.

But nobody believes it until it's happened to them. It just sounds too implausible...

Post reply on HN