And in OGNL it's similar to apply an _expression_ to any collection,
enumeration or iterator: parent.children.{ #this.doSomething() } or you can filter any collection, enumeration or iterator using filteredItems = parent.children.{? name.startsWith("foo") } This is what Buddha would have used for an _expression_ language. - Drew // OGNL since 1998 josh zeidner wrote: Thomas, I was about to say practically the same thing... in python:foreach( SomeObject ) It amazing! Its going save us billions in development costs! Crom the Mighty, the patron diety of Ruby on Rails is very pleased with block enumerators. Do they pass out pills at Ruby user group meetings? -jmz --- Thomas Hicks <[EMAIL PROTECTED]> wrote:At 09:44 AM 6/22/2006, Chad wrote:Cool. I checked out the REXML page. This quote isgreat:------------------------------------ "Some of the common differences are that the RubyAPI relies on blockenumerations, rather than iterators. For example,the Java code:for (Enumeration e=parent.getChildren();e.hasMoreElements(); ) {Element child = (Element)e.nextElement(); // Dosomething with child} in Ruby becomes: parent.each_child{ |child| # Do something withchild }Can't you feel the peace and contentment in thisblock of code? Rubyis the language Buddha would have programmed in." ---------------------------------------Dr. Ralph Griswold (creator or SNOBOL and Icon programming languages) used to say that there's really nothing new under the sun in CS, it's all recycled. I have to note that this statement form you admire so much comes directly from Smalltalk of 20 years ago! regards, -tom---------------------------------------------------------------------To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- +---------------------------------+ < Drew Davidson | OGNL Technology > +---------------------------------+ | Email: [EMAIL PROTECTED] / | Web: http://www.ognl.org / | Vox: (520) 531-1966 < | Fax: (520) 531-1965 \ | Mobile: (520) 405-2967 \ +---------------------------------+ |
- Re: [jug-discussion] App Dev Framework choices Erik Hatcher
- Re: [jug-discussion] App Dev Framework choices Warner Onstine
- Re: [jug-discussion] App Dev Framework choices Erik Hatcher
- Re: [jug-discussion] App Dev Framework choices Chad Woolley
- Re: [jug-discussion] App Dev Framework choices Erik Hatcher
- Re: [jug-discussion] App Dev Framework choices Andrew Lenards
- Re: [jug-discussion] App Dev Framework choices Chad Woolley
- Re: [jug-discussion] App Dev Framework cho... Thomas Hicks
- Re: [jug-discussion] App Dev Framewor... josh zeidner
- Re: [jug-discussion] App Dev Fram... Drew Davidson
- Re: [jug-discussion] App Dev ... josh zeidner
- Re: [jug-discussion] App Dev Framewor... Chad Woolley
- Re: [jug-discussion] App Dev Fram... Andrew Lenards
- Re: [jug-discussion] App Dev ... Erik Hatcher
- Re: [jug-discussion] App Dev Framework cho... Erik Hatcher
- Re: [jug-discussion] App Dev Framewor... Chad Woolley
- Re: [jug-discussion] App Dev Framewor... josh zeidner
- RE: [jug-discussion] App Dev Framework choices Rick Hightower
- RE: [jug-discussion] App Dev Framework choices josh zeidner
- RE: [jug-discussion] App Dev Framework choices Rick Hightower