Article:
  Readable Java 1.5
Subject:   I partially agree
Date:   2003-09-25 00:38:22
From:   anonymous2
I think the 'eachof' keyword would be a good alternative to ':' (I agree it's cryptic), but I think the proposed generics syntax is not more readable (for me) than the JDK 1.5 one (it's too similar to a cast and at first look it doesn't seem it's generic code).
Full Threads Newest First

Showing messages 1 through 1 of 1.

  • I partially agree
    2003-10-22 14:56:06  anonymous2 [View]

    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) {
    }