This is a little ditty I made up myself to be sung to "Old
MacDonald Had a Farm".
Kernighan and Ritchie made up C, e-i, e-i-o
And for this C they made some rules, e-i, e-i, o
Put a semi-colon here, and a semi-colon there,
Here there's one, but there there's not,
So everybody swears a lot!
Kernighan and Ritchie made up C, e-i, e-i-o
Each function call needs two parens, e-i, e-i, o
With a right paren here, and a left paren there,
In C they're needed, in Eiffel not,
The compiler yells if you forgot!
Kernighan and Ritchie made up C, e-i, e-i-o
And in this C there are more rules, e-i, e-i-o
Use a single equal here, and a double equal there,
The first assigns, the next compares,
So use the equal sign with care!
In C++ we now add class, e-i,e-i-o
Public data can be changed, by any old Joe Blow,
So make an accesssor here, and data private there,
Here a get, there a set,
Or things can change that you'll regret!
In C++ we now add class, e-i, e-i-o,
But just one file can have a lot, e-i,e-i-o
So you need a class name first, a colon colon next,
A function name's not a member name,
Unless you first put its class name.
Kernighan and Ritchie made up C, e-i, e-i-o.