Writing DSLs in Groovy
Recorded at:
Should read "scripting with Groovy"
by
Hermann Schmidt
The last 10 minutes or so Scott quickly demonstrates how to extend the meta class of a closed (final) Java class (Integer) to do the ubiquitous "2.hours + 10.minutes" example. That's more like it.
2.hours and 10.minutes
by
Hossam Karim
class Movie(var title:String, var duration: Int) {
override def toString = title + " runs for " + duration + " minutes"
}
implicit def units(i: Int) = new {
def hours = i * 60
def minutes = i
def and(j: Int) = i + j
}
val starWars = new Movie("Star Wars", 2.hours and 30.minutes)
println(starWars)
Re: The video seems to doesn't work anymore...
by
Dragan Stankovic
Re: The video seems to doesn't work anymore...
by
Floyd Marinescu
Re: Should read
by
Scott Davis
grade
by
Gene De Lisa
The videographer was a bit clueless on the terminal screenshots when zooming in on the left side of directory listings. We were all wondering what the permissions were and not what he was talking about right?
As a presenter he gets a D. The first half is mostly about him. Count how many times he uses the word "I".
That is the problem with these conferences. The entire point is gratifying the ego of the presenter; the anti-pattern to Kathy Sierra's "you rock".




Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think