The Artima Developer Community
Sponsored Link

Java Buzz Forum
Pnuts Updates (Generator simplifies callback style functions)

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
Toyokazu Tomatsu

Posts: 66
Nickname: tomatsu
Registered: Jul, 2003

Toyokazu Tomatsu is a developer of Pnuts.
Pnuts Updates (Generator simplifies callback style functions) Posted: Jul 19, 2004 7:04 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Toyokazu Tomatsu.
Original Post: Pnuts Updates (Generator simplifies callback style functions)
Feed Title: Pnuts Addict
Feed URL: http://pnuts.org/~tomatsu/jroller-rss.xml
Feed Description: Toyokazu Tomatsu's Weblog
Latest Java Buzz Posts
Latest Java Buzz Posts by Toyokazu Tomatsu
Latest Posts From Pnuts Addict

Advertisement
20040719(1.1beta)

  • 1. Generator can simplify callback-style functions. For example, readLines() function takes a closure called for each line. With generator, the same thing can be written in for-statement.
        // callback-style
        readLines("/etc/passwd", function (i) println(i))
    
        // with generator
        for (i : readLines("/etc/passwd")){
          println(i)
        }
    
    The following functions can also be simplified using generator.
  • 2. Added a new expression: generator[n]
    Returns n'th generated object. If the generator generates less than n, returns null.
  • 3. openJDBC() can take javax.sql.DataSource and java.sql.Connection, as well as jdbc-url.
  • 4. Bug fixes:

Read: Pnuts Updates (Generator simplifies callback style functions)

Topic: [Jul 12, 2004 04:18 PDT] 23 Links Previous Topic   Next Topic Topic: Mule ESB server

Sponsored Links



Google
  Web Artima.com   

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