ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Readable Java 1.5
Subject:   I partially agree
Date:   2003-10-22 14:56:06
From:   anonymous2
Response to: I partially agree

Agree. When I tried to read the author's proposed alternative syntax, it just didn't read like English.


Python has a syntax of


for i in collection:
# something here


If we were to add 'foreach' as a keyword, what about 'in'? I double programmers would use the word 'in' as a variable. How about:


for ( Object c in collection) {
}