www.digitalmars.com         C & C++   DMDScript  

D - foreach appears in Qt

reply "Derek Parnell" <Derek.Parnell psyc.ward> writes:
In the soon-to-be-released Qt 4, I noticed that it now has a foreach  
construct...

     foreach (QString s, list)
             sum += s.length();

Looks somewhat familiar.

The full article is at  http://doc.trolltech.com/qq/qq09-qt4.html

-- 
Derek
Apr 19 2004
parent "Walter" <walter digitalmars.com> writes:
"Derek Parnell" <Derek.Parnell psyc.ward> wrote in message
news:opr6oz1zdhu2m3b2 news.digitalmars.com...
 In the soon-to-be-released Qt 4, I noticed that it now has a foreach
 construct...

      foreach (QString s, list)
              sum += s.length();

 Looks somewhat familiar.

 The full article is at  http://doc.trolltech.com/qq/qq09-qt4.html

D is full of great ideas from a lot of smart people. I expect many of them are going to be adopted by other languages <g>.
Apr 19 2004