Linked by Thom Holwerda on Tue 15th Jan 2013 21:24 UTC
General Development "I was really excited to write this article, because it gave me an excuse to really think about what beautiful code is. I still don't think I know, and maybe it's entirely subjective. I do think the two biggest things, for me at least, are stylistic indenting and maximum const-ness. A lot of the stylistic choices are definitely my personal preferences, and I'm sure other programmers will have different opinions. I think the choice of what style to use is up to whoever has to read and write the code, but I certainly think it's something worth thinking about. I would suggest everyone look at the Doom 3 source code because I think it exemplifies beautiful code, as a complete package: from system design down to how to tab space the characters." John Carmack himself replies in the comments.
Thread beginning with comment 549016
To read all comments associated with this story, please click here.
As a long time C++ programmer...
by reduz on Wed 16th Jan 2013 15:04 UTC
reduz
Member since:
2006-02-25

And having written several game engines for games shipped to most plaforms.. this article is great.

I can definitely say that there is a point to be made here about C++. For this kind of things, C++ is still the best choice up to this day because the optimal ratio of OOP/Low Level/Performance/Code Size. Other languages bloat too much in one or more of these elements but C++ hits the balance.

The problem with C++ is that I think it's a language that takes around a decade of using it to fully come to terms with. Reading the source code of other people that is more experienced greatly helps but truth is that even if you read the full specification, you will still not understand what most features are really used for until you need them, and then it clicks.

Reply Score: 3