Reply to post: Re: Is C++ becoming too large and complex?

Classy move: C++ 20 wins final approval in ISO technical ballot, formal publication expected by end of year

Man inna barrel

Re: Is C++ becoming too large and complex?

Languages get messy because life is messy.

C is actually a very good language, because it provides just enough abstraction from the underlying hardware, but no more than that. If you have ever migrated an embedded software application from device-specific assembler to C, you would appreciate just how useful a C compiler is.

At the opposite end of the abstraction scale, I have experimented with various higher level languages, particularly functional languages such as Haskell. They are mostly elegant, fantastic at abstraction, and totally useless for any real work. I did manage to get some statistical analysis done in Ocaml, which was quite neat.

With C++, I am still learning C++11, so I am way behind. I lapped up many of the new concepts, but I still have a lot to learn. This does not appear to be a problem. I could still write code in older style C++ if I wanted to. I could write my code without range-for loops or auto declared types. I am not forced to use these features, but they are handy once you learn about them.

These complications to the language fix some problems, or simplify writing routine code. I used to write a lot of iterate-over-the-container stuff using the old for loop and iterators ideom. Pretty verbose, and occasionally prone to errors. The simpler range-for syntax makes the code more readable and maintainable. I found the auto type declaration method quite friendly, having got used to type inference in functional languages.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon