The Artima Developer Community
Sponsored Link

Java Buzz Forum
JSR 201: Enhanced for loops

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Bernard Choi

Posts: 74
Nickname: bchoi
Registered: Jun, 2003

Bernard Choi is online
JSR 201: Enhanced for loops Posted: Jun 26, 2003 7:45 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Bernard Choi.
Original Post: JSR 201: Enhanced for loops
Feed Title: Bernard Choi
Feed URL: http://bchoi.livejournal.com/data/rss
Feed Description: Bernard Choi - LiveJournal.com
Latest Java Buzz Posts
Latest Java Buzz Posts by Bernard Choi
Latest Posts From Bernard Choi

Advertisement
I guess the experts would have considered this, but I would like to ask, what are the considerations of having
(1) for (Item i : c)               over
(2) foreach (Item i : c)           or even
(3) foreach (Item i in c)          ?

I just feel (1) smells. It doesn't read well. Overloading "for" doesn't feel like a good idea. Since there'll already be changes, might as well do a good job.

Read: JSR 201: Enhanced for loops

Topic: Skipping and Seeking; strange Java API discrepancy of the day Previous Topic   Next Topic Topic: The first program I ever wrote myself

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use