On Sat, Feb 7, 2009 at 11:58 PM, Riobard Zhan firstname.lastname@example.org wrote:
On 8-Feb-09, at 3:50 AM, Bruce Leban wrote:
You can not generalize that far. Most programming languages require commas
(notable exceptions include Lisp and Tcl), but Python is the only language that requires trailing colons.
Nope. See http://en.wikipedia.org/wiki/Smalltalk
Just checked. Smalltalk's colons seem to have completely different semantics. Correct me if I'm wrong, but they appear to be at the end of every keyword, including ifTrue and ifElse.
Your statement that no programming language used trailing colons is simply false. I and many others have said that colons and semicolons have completely different semantics as well and you have chosen to ignore that.
Clearly the use of the specific semicolon character is confusing you. So
let's replace it with a better symbol: \n as in this example:
for i in x: foo(i) \n bar(i+1)
Sure a \n is optional at the end of any line because a blank line is always allowed. So what?
What's the point you are trying to make?
The point is that the \n token and the : token have different semantics entirely. The \n token is used to separate statements on a single line. You seem to think that they are related because they look similar and now they don't.
One more final point: in some languages, the semicolon is a statement TERMINATOR as it is in C and in others it is a statement SEPARATOR as it is in Pascal. I think your time would be better served by working to convince the Pascal people and the C people to reconcile that inconsistency than this discussion.