ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Smith" <asmit...@hotmail.com>
Subject Re: [ANN] Collecting requirements for Ant2
Date Thu, 22 Mar 2001 05:53:34 GMT
Peter Donald <donaldp@apache.org> wrote:

[re: foreach being evil and SQL's select being good]

>select has zero ordering semantics

Foreach also has zero ordering semantics. In fact, saying 'SELECT * FROM 
MyTable' is equivalent to 'foreach (*) in MyDirectory'. (In reality both 
select and foreach impose default ordering on the result set but that still 
doesn't produce a valid argument against either).

As for nesting selects, you can nest foreach too:

SELECT * FROM MyTable WHERE (SELECT ...) is roughly equivalent to

foreach $file in MyDirectory
  foreach $extension in $file
    print $file.$extension

Alex Smith
Insight LLC
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


Mime
View raw message