Live data from Hacker News

Modernize your C++ code

jarchitect.com

1–10 of 34 posts

Re: Modernize your C++ code

#4
if c++ initially came out with c++11 syntax and features. It might be a good language. Now. c++ became a monster including so many different styles, conventions, usages. It's too hard to choose it unless you have legacy system to support.

Re: Modernize your C++ code

#8

I see no tangible reason to do this. I mean, all of this is nice , but it's just messing with the working codebase for the sake of messing with it.

More maintainable and idiomatic code.

What makes you think that this "modernization" will make it more maintainable, leave alone more idiomatic?

Re: Modernize your C++ code

#9

I see no tangible reason to do this. I mean, all of this is nice , but it's just messing with the working codebase for the sake of messing with it.

Well to take the very first example from the article, adding "override" keywords: that improves your chances of avoiding bugs during normal maintenance. Have you never seen a base class that had more than a few derived classes, some of which may be in places you didn't even know about? Now imagine tweaking a base class method's signature slightly, and missing one of those derived classes somewhere, which had been trying to keep its copy of the signature in sync. Before it was overriding, now it is just a new method; there's a bug that "modernization" would have caught for you.

Re: Modernize your C++ code

#10

I see no tangible reason to do this. I mean, all of this is nice , but it's just messing with the working codebase for the sake of messing with it.

I do not see why you were downvoted. I earn my living writing C++ for a living for mission critical CAD applications and I cannot imagine me or any one of my colleagues use an automatic converter.

C++11 is nice. For new code. I see no reason to use this for old, working code.

Post reply on HN