Re: How to name variables in a program?
- From: August Karlstrom <fusionfive@xxxxxxxxx>
- Date: Mon, 30 May 2005 17:53:13 GMT
Phlip wrote:
And don't get me started about :=.
Ok, you brought it up. What we really want is a left arrow. Unfortunately it's neither available in the basic ASCII set nor on standard keyboards. The `=' symbol has been used for ages (and still is) to denote equality. To use `=' for assignment and `==' for equality is just downright stupid. Moreover it's something that has to be explained in every introduction to a language from the C syntax family:
"`x = x + y;' might seem like a strange statement, but..."
....and we shouldn't mention the perfectly valid c statement
if (x = 0) ...
> You must type two characters for the most
common form of equalization (assignment)...
This is a silly argument.
Also don't use i. Just because everyone else does it doesn't make it right.
What's wrong with `i' as a local variable?
- use camelCase for methods
This is standard in Java. Other languages has other conventions.
"standard"? The Java hook is the language started recently, from a single source, and spread rapidly, conveying the style of its progenitors.
Not sure of what you mean.
-- August .
- Follow-Ups:
- Re: How to name variables in a program?
- From: Phlip
- Re: How to name variables in a program?
- References:
- How to name variables in a program?
- From: SerGioGio
- Re: How to name variables in a program?
- From: Phlip
- Re: How to name variables in a program?
- From: August Karlstrom
- Re: How to name variables in a program?
- From: Phlip
- How to name variables in a program?
- Prev by Date: Re: Java vs. C++
- Next by Date: Re: How to name variables in a program?
- Previous by thread: Re: How to name variables in a program?
- Next by thread: Re: How to name variables in a program?
- Index(es):