Saturday, November 20, 2010

Object Declaration

Given the following declaration:class Base1 {} Base2; Base2 is an object and not a class.

This is an object (or instance). By convention 'Base2' should have been named 'base2' with a lower first letter.

A name that has several words with all but the first word capitalized (first letter of the word uppercase) is called Camel notation, because of the pattern lowercase, uppercase, lowercase, .... A name that has all of the words Capitalized is called Pascal notation, because it was the convention for programming in the Pascal Language. Putting the type information in lower letters in front of a name is called Hungarian notation. It was invented by Charles Simonyi, an Hungarian- American who worked for Microsoft. An example of this notation is szName for an null-terminated string. Micosoft used to use this notation a lot, but now discourages it; they rather have you use their programming environment to provide you with the type information.

References:
http://en.wikipedia.org/wiki/Hungarian_notation

http://en.wikipedia.org/wiki/Charles_Simonyi

No comments:

Post a Comment