User loginNavigation |
Sun's new JavaFX Script languageSun recently announced JavaFX Script, a new Java-based scripting language designed for use with Sun's nascent rich interactive application development platform, JavaFX. JavaFX Script is statically typed, but it seems heavily influenced by dynamic languages like Python and JavaScript. JavaFX Script provides an unusual declarative syntax intended to facilitate rapid interface development and it has some interesting features like support for first-class functions and Pythonic list comprehensions. The language also has some really unusual array manipulation operators that are somewhat thought provoking. Here are a few samples to consider: var titleTracks = select indexof track + 1 from album in albums, track in album.tracks where track == album.title; select n*n from n in [1..100]; function factors(n) { return select i from i in [1..n/2] where n % i == 0; } x = [1,2,3]; insert 10 as first into x; // yields [10,1,2,3] insert 6 after x[. == 2]; // yields [10,1,2,6,3] You can also find some good examples of the declarative interface design syntax in Sun's JavaFX Script tutorial for Swing developers. -- Ryan Paul |
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 15 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago