“He said, \\\”hi.\\\””
Use double quotes
Another common mistake is to use apostrophes to indicate strings instead of quotation marks. As you
sHello = “Hello”;
sHello = ‘Hello’;
you want internationalization. In fact, because apostrophes are much more common than quotation
marks in everyday language (especially in languages like French), you run into the same problem we
just explored with quotation marks, but far more often. Because of this, it’s considered best practice to
only use quotation marks to represent strings.
When creating desktop applications, most developers don’t need to think much about optimization. For
the most part, programming languages are optimized when they are compiled: All variables, functions,
objects, and so on, are replaced with symbolic pointers that are understood only by the processor.
Macros are compiled to be faster than function calls. Templates are used to speed up object creation. But
download time and speed of execution.
When using Java or other such programming languages, developers need not give any thought to hav-
ing variable names that are 100 characters long because the names are all replaced; they need not worry
do not have this luxury.
are included. These and other factors increase the download time and thus increase the overall time it
22_579088 ch19.qxd 3/28/05 11:43 AM Page 573