Saturday, August 8, 2009

C++ Concepts

I think after reading Bjarne Stroustrup's interview on concepts, I have reaffirmed by belief that C++ has become the wrong answer to pretty much any question.

The language just reeks of 'bored programmer syndrome'. More and more stuff added to it for the sake of expanding the language because using simple languages is 'boring'. C++ is crammed full of geek cred.. so many obscure features, strange interactions, special rules, etc. This is not a good thing for a language. A language should be quick and simple to learn with lots of useful APIs to use.

C++ on the other hand turns learning the language into a skill in and of itself. A bit like victorian erra protocol for dating. The complexity seems to exist purely so you can say you learned the complexity and thus show your aristocratic heritage. Meanwhile it did not actually change any of the actual abilities to date.

4 comments:

nef said...

I've always thought of C++ as C w/ the really nice shit from higher lvl languages tacked on.

I think that's a good thing. I don't like lumping C/C++ together, i treat them as seperate languages myself. But for instance, regular expressions would be a godsend and (god forbid) delegates would be nice too.

I guess it makes more sense to just go and use a higher level language for text parsing or whatever, but soemtimes you need that functionality in an app that needs tighter efficency?

I don't mind them bloating C++, the difficulty to learn it is a non-factor by this point for me, I know enough to do most everything I could imagine w/ it but it is overwhelmingly complex compared to higher level languages.

(The STL needs a makeover as well IMO, wtf is my string::format() ??!)

Nathan Weyer said...

I more see C++ as a 'OOPish language designed to migrate the army of C programmers', so it does all of it's OOP in very C like ways.

Objective C would be closer to 'C with nice shit from other languages'.

Actually, C supports regular expressions ^_~

And true, the difficulty of learning new additions is not that bad for experienced C++ programmers. Heh.. I just though of something. It is a bit like EVE,.. keep adding new high end content to keep the older players interested, lest they leave for other languages.

nef said...

Haha.

Not related to the subject, but to denote you're EvE example:

Eve is it's own thing, new content or not, there is nothing like it competative wise :)

I had no idea reg. C supported Reg. Expressions. Never worked w/ Objective C so i can't comment there.

It's overall difficult I guess, for me anyways, to continue this convo. I know 3 language enought to mention, C, C++ and C#. I've fallen in love w/ C# the same way I did w/ BASH scripting only to a higher extent now. I can't help but respect the roots of C and think that adding the higher level stuff to C++ is a good thing.

You can write tight embeded code in C++ but still have acess to the higher level components of languages as you need them. That's how i see it anyways.

Nathan Weyer said...

I have not gotten to play with C# yet, but I do hear good things about it.

ObjectiveC is ANSI C with the SmallTalk OOP layer added to it. Generic programming comes out naturally (no need for templates/STL/etc) and objects are significantly different things (as opposed to structs with extra data slapped in).

I agree C++ is great for going between low and high level (though in cases like that, I tend to suggest just using C with a C compiler, thus remove the chances of C++ side effects). But due to it's overlaping solutions, long term maintenance can actually be a headache there too. There are just too many ways to solve the same problem, so you generally either have to (a) restrict your developers to using a subset of the language or (b) train your developers in ALL the solutions and ALL of the nooks and crannies of the language.

And this gets back to my original complaint with Concepts. They will make certain types of tasks easier, but they are yet ANOTHER duplicate way of doing the same thing you could already do... only fancier.