User: Password:
Subscribe / Log in / New account

C++ Game development

C++ Game development

Posted Dec 10, 2005 8:53 UTC (Sat) by dvdeug (subscriber, #10998)
In reply to: C++ Game development by mvogt
Parent article: The Boost C++ Libraries

Since when is correctness taking second place to performance and speed-to-market unusual? C++ itself puts correctness second to performance in relegating bounded arrays to the library. If you put correctness first, you would use the SPARK programming language, or something similar, and never release unless every possible test has been passed. But in reality, virtually every program releases with known bugs, frequently major ones. Jon Bentley mentions in one of the Programming Pearls books that given a 10x speed improvement on his typesetting system or all the bugs fixed, that he would have taken the speed up. If you (believably) made the offer on the GCC list, I suspect the list would blow up in a flame war over the issue.

(Log in to post comments)

C++ Game development

Posted Dec 10, 2005 22:05 UTC (Sat) by mvogt (guest, #34379) [Link]

Fair enough, there are obviously application domains where approximations are acceptable, and those where they are not. What would be the point of a 'grep' that returned most matches, or a 'find' with false positives?

C++ does not put correctness second to performance, it ensures that you needn't pay for what you don't use. (Ignoring legacy C built-in arrays,) if you can guarantee array bounds will not be violated you can use the subscript operator for unchecked access; you can use the 'at' member function to get runtime checking where desirable. 'Relegating... to the library' has been the favoured C++ evolution strategy, for right or wrong. It doesn't indicate that something is less correct or important.

I will admit that C++ puts guranateed correctness second to pragmatism. Languages that don't have not been conspicuously successful in general purpose programming.

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds