Frankly, for many of these so called conventions, I just want to swear. They just got your mind so twisted, so unsure about their meanings and so much more to remember.
Where to start? how about foo? foo... let's forget about it, I will never make up some examples with this name.
1. Parameter names of command line tools.
- usually is short form of it. -- is full form of it.
for example, -a is same as --attributes if a parameter is called attributes.
2. single and double quotes. ' and "
In many circumstances, these two a interchangeable, You can use 'xxx"xxx' to have a double quote in result string, or you can use "xxx'xxx" to have a single quote in your result string.
But in Unix world, single quote means everything within it is as is. Double quote means pretty much same thing, but with exceptions, except $, \ and !, which can have special meaning and allow something such as substitute a variable with its value.
This is a scenario that same symbol has different meanings in several popular coding environment, which gives you hard time by paying special attention to them.
No comments:
Post a Comment