To date, I have not been a coder in the GnuBg project, so you should take my
input with a grain of salt.
Having said that, I must also confess that the one time I looked through
some of the GnuBg source code, I was shocked to see that it was coded in C
instead of C++.
While it is true
I'm not sure this comment actually means that we should prefer a
programming language over an other. As Steve McConnell says in Code
Complete 2:
Program into your language. Not in it!
By this he mean abstraction to data types. What the GNU Backgammon code is
missing is real abstraction of
Let me make up the same program snippet with C++ syntax:
Board board = Board();
Evaluator* eval = new gnubg();
Dice roll = Dice( 3, 1);
Move best = eval-find_best_move( board, roll );
std::cout Best move is: best;
// I just made up this code based on the abstractions I listed in the
Howdy All,
Last July Richard Stallman made one significant change to the GNU Coding
Standard so that it no longer prefer C to other such languages.
This was a significant departure from the original coding standard which
preferred C over other languages, and chided C++ in particular.
The latest
Hi!
I must admit that I'm not a big fan of C++ but at least it does not
make me sick (like Perl does).
I usually have problems seeing what you can gain from using C++ over C?
+ you get better abstraction with C++.
+ you get templates which may simplify some things.
+ you get operator