SlideShare uma empresa Scribd logo
1 de 76
[object Object]
Canoo Engineering AG
@HamletDRC
A Very Groovy Birthday ,[object Object]
Hamlet D'Arcy
Canoo Engineering AG
@HamletDRC
A Very Groovy Birthday ,[object Object]
Hamlet D'Arcy
Canoo Engineering AG
@HamletDRC
2003 ,[object Object]
2003 ,[object Object]
2003 Closure ,[object Object]
“Refactored CompositeString  to be called ______ :)”
2003 Closure GString ,[object Object]
2003 Range Closure GString ,[object Object]
2003 Range MarkupBuilder Closure GString ,[object Object]
new  groovy.xml.MarkupBuilder().root() { ( 1 .. 3 ).each { child(id:  "child $it " ) } }
new  groovy.xml.MarkupBuilder().root() { ( 1 .. 3 ).each { child(id:  &quot;child $it &quot; ) } } <root> <child id='child1' /> <child id='child2' /> <child id='child3' /> </root>
2004 2003 Range MarkupBuilder Closure GString ,[object Object]
2004 2003 JSR-241 Range MarkupBuilder Closure GString ,[object Object]
2004 2003 JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object]
def  text =  '''Dear $person, So nice to meet you in <% print city %>. Sincerely, $signed''' def  vars = [person: 'JUG' , city: 'Geneva' , signed: 'Hamlet' ]  def  engine = new groovy.text.SimpleTemplateEngine()  engine.createTemplate(text).make(vars)
def  text =  '''Dear $person, So nice to meet you in <% print city %>. Sincerely, $signed''' def  vars = [person: 'JUG' , city: 'Geneva' , signed: 'Hamlet' ]  def  engine = new groovy.text.SimpleTemplateEngine()  engine.createTemplate(text).make(vars)  Dear JUG, So nice to meet you in Geneva. Sincerely, Hamlet
2005 2004 2003 JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object]
2005 2004 2003 XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object]
2005 2004 2003 XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object]
2005 2004 2003 XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object]
2006 2005 2004 2003 XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object]
2006 2005 2004 2003 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],0.1-0.3
2006 2005 2004 2003 Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],0.1-0.3
2007 2006 2005 2004 2003 Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],0.1-0.3
2007 2006 2005 2004 2003 Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0, 1.5 0.1-0.3
String. class .metaClass.default = { self ->  self ?:  '<unknown>' } '' .default()
2007 2006 2005 2004 2003 Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0, 1.5 0.4-0.7 0.1-0.3
2007 2006 2005 2004 2003 Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0, 1.5 0.4-0.7 0.1-0.3
2007 2006 2005 2004 2003 Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0, 1.5 0.4-0.7 0.1-0.3
2007 2006 2005 2004 2003 Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0, 1.5 0.4-0.7 0.1-0.3
2008 2007 2006 2005 2004 2003 Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0, 1.5 0.4-0.7 0.1-0.3
2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0, 1.5 0.4-0.7 0.1-0.3
@Grab( group= 'org.ccil.cowan.tagsoup' ,  module= 'tagsoup' ,  version= '1.2' ) import  org.ccil.cowan.tagsoup.Parser def  parser = new XmlParser(new Parser()) def  url =  'http://twitter.com/hamletdrc' def  html = parser.parse(url)
2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.6, 1.7 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
def  (x, y) = [ 1 ,  2 ] @Singleton, @Lazy, @Immutable, @Delegate,  ... and more
def  (x, y) = [ 1 ,  2 ] assert  x == 1 assert  y == 2
2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2010 2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2010 2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.3 0.9 1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2010 2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.3 0.9 0.4, 0.5 1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2010 2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.3 0.9 0.4, 0.5 1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2011 2010 2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.3 0.9 0.4, 0.5 1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2011 2010 2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.8 2.0 1.3 0.9 0.4, 0.5 1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
Command Chains stand 7.minutes at busstop ride 10.stops on bus towards Basel
JSON Builder import  groovy.json.* def  json =  new  JsonBuilder() json.person { name  'William Tell' status  'mythological' }
AST Transformations @ToString, @EqualsAndHashCode @TupleConstructor, @Canonical @Log, @Field, @Package, ... and many more
2011 2010 2009 2008 2007 2006 2005 2004 2003 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.8 2.0 1.3 0.9 0.4, 0.5 1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2011 2010 2009 2008 2007 2006 2005 2004 2003 2012 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.8 2.0 1.3 0.9 0.4, 0.5 1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2011 2010 2009 2008 2007 2006 2005 2004 2003 2012 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.0 0.17 1.0 1.8 2.0 1.3 0.9 0.4, 0.5 1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
2011 2010 2009 2008 2007 2006 2005 2004 2003 2012 2.0 @Grab Gant 0.3 Duration MockFor XmlSlurper JSR-241 SimpleTemplateEngine Range MarkupBuilder Closure GString ,[object Object],1.0 1.0 0.17 1.0 1.8 2.0 1.3 0.9 0.4, 0.5 1.6, 1.7 1.1, 1.2 1.0 1.0, 1.5 0.4-0.7 0.1-0.3
void  method(String message) { if  (message !=  null ) { log.info( &quot;Received input: ${ message.toUppercase() }&quot; ) } }
@groovy.transform.TypeChecked void  method(String message) { if  (message !=  null ) { log.info( &quot;Received input: ${ message.toUppercase() }&quot; ) } }
@groovy.transform.TypeChecked void  method(String message) { if  (message !=  null ) { log.info( &quot;Received input: ${ message.toUppercase() }&quot; ) } } 1 compilation error: [Static type checking] - Cannot find matching  method java.lang.String#toUppercase() at line: 4, column: 43
void  method(Object message) { if  (message  instanceof  String) { log.info( &quot;Received input: &quot;  + message.toUpperCase() ); } }
@groovy.transform.TypeChecked void  method(Object message) { if  (message  instanceof  String) { log.info( &quot;Received input: ${ message.toUpperCase() }&quot; ) } }
def   keys =  [x: 1 ,y: 2 ,z: 3 ] *.key def   values =  [x: '1' ,y: '2' ,z: '3' ] *.value keys*.toUpperCase() values*.toUpperCase()
Dimension d1 = [ 100 ]  Dimension d2 = [ '100' , '200' ]  Dimension d3 =  new   Dimension(   width:  100 ,    height:  100 ,    depth:  100 )
@groovy.transform.TypeChecked –  Not a static compiler –  No new syntax  –  No new semantics –  Bytecode not changed –  Targeted at Java developers

Mais conteúdo relacionado

Mais procurados

concurrency gpars
concurrency gparsconcurrency gpars
concurrency gparsPaul King
 
Profiling and optimizing go programs
Profiling and optimizing go programsProfiling and optimizing go programs
Profiling and optimizing go programsBadoo Development
 
Down to Stack Traces, up from Heap Dumps
Down to Stack Traces, up from Heap DumpsDown to Stack Traces, up from Heap Dumps
Down to Stack Traces, up from Heap DumpsAndrei Pangin
 
MongoDB - Monitoring & queueing
MongoDB - Monitoring & queueingMongoDB - Monitoring & queueing
MongoDB - Monitoring & queueingBoxed Ice
 
Leap Ahead with Redis 6.2
Leap Ahead with Redis 6.2Leap Ahead with Redis 6.2
Leap Ahead with Redis 6.2VMware Tanzu
 
CRUFT! - Peter Kriens, President, aQute
CRUFT! - Peter Kriens, President, aQuteCRUFT! - Peter Kriens, President, aQute
CRUFT! - Peter Kriens, President, aQutemfrancis
 
Living with Garbage by Gregg Donovan at LuceneSolr Revolution 2013
Living with Garbage by Gregg Donovan at LuceneSolr Revolution 2013Living with Garbage by Gregg Donovan at LuceneSolr Revolution 2013
Living with Garbage by Gregg Donovan at LuceneSolr Revolution 2013Gregg Donovan
 
Rop and it's friends
Rop and it's friendsRop and it's friends
Rop and it's friendsnuc13us
 
Feb14 successful development
Feb14 successful developmentFeb14 successful development
Feb14 successful developmentConnor McDonald
 
Pwning in c++ (basic)
Pwning in c++ (basic)Pwning in c++ (basic)
Pwning in c++ (basic)Angel Boy
 
Kubernetes Tutorial
Kubernetes TutorialKubernetes Tutorial
Kubernetes TutorialCi Jie Li
 
Bdd: Tdd and beyond the infinite
Bdd: Tdd and beyond the infiniteBdd: Tdd and beyond the infinite
Bdd: Tdd and beyond the infiniteGiordano Scalzo
 
What is wrong on Test::More? / Test::Moreが抱える問題点とその解決策
What is wrong on Test::More? / Test::Moreが抱える問題点とその解決策What is wrong on Test::More? / Test::Moreが抱える問題点とその解決策
What is wrong on Test::More? / Test::Moreが抱える問題点とその解決策kwatch
 
Monitoring MongoDB (MongoSV)
Monitoring MongoDB (MongoSV)Monitoring MongoDB (MongoSV)
Monitoring MongoDB (MongoSV)Boxed Ice
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Paul King
 

Mais procurados (20)

concurrency gpars
concurrency gparsconcurrency gpars
concurrency gpars
 
Profiling and optimizing go programs
Profiling and optimizing go programsProfiling and optimizing go programs
Profiling and optimizing go programs
 
Down to Stack Traces, up from Heap Dumps
Down to Stack Traces, up from Heap DumpsDown to Stack Traces, up from Heap Dumps
Down to Stack Traces, up from Heap Dumps
 
Redis 101
Redis 101Redis 101
Redis 101
 
MongoDB - Monitoring & queueing
MongoDB - Monitoring & queueingMongoDB - Monitoring & queueing
MongoDB - Monitoring & queueing
 
Groovy
GroovyGroovy
Groovy
 
Leap Ahead with Redis 6.2
Leap Ahead with Redis 6.2Leap Ahead with Redis 6.2
Leap Ahead with Redis 6.2
 
CRUFT! - Peter Kriens, President, aQute
CRUFT! - Peter Kriens, President, aQuteCRUFT! - Peter Kriens, President, aQute
CRUFT! - Peter Kriens, President, aQute
 
Living with Garbage by Gregg Donovan at LuceneSolr Revolution 2013
Living with Garbage by Gregg Donovan at LuceneSolr Revolution 2013Living with Garbage by Gregg Donovan at LuceneSolr Revolution 2013
Living with Garbage by Gregg Donovan at LuceneSolr Revolution 2013
 
Rop and it's friends
Rop and it's friendsRop and it's friends
Rop and it's friends
 
Feb14 successful development
Feb14 successful developmentFeb14 successful development
Feb14 successful development
 
Pwning in c++ (basic)
Pwning in c++ (basic)Pwning in c++ (basic)
Pwning in c++ (basic)
 
Kubernetes Tutorial
Kubernetes TutorialKubernetes Tutorial
Kubernetes Tutorial
 
Bdd: Tdd and beyond the infinite
Bdd: Tdd and beyond the infiniteBdd: Tdd and beyond the infinite
Bdd: Tdd and beyond the infinite
 
iCloud keychain
iCloud keychainiCloud keychain
iCloud keychain
 
What is wrong on Test::More? / Test::Moreが抱える問題点とその解決策
What is wrong on Test::More? / Test::Moreが抱える問題点とその解決策What is wrong on Test::More? / Test::Moreが抱える問題点とその解決策
What is wrong on Test::More? / Test::Moreが抱える問題点とその解決策
 
Monitoring MongoDB (MongoSV)
Monitoring MongoDB (MongoSV)Monitoring MongoDB (MongoSV)
Monitoring MongoDB (MongoSV)
 
Project in programming
Project in programmingProject in programming
Project in programming
 
Common scenarios in vcl
Common scenarios in vclCommon scenarios in vcl
Common scenarios in vcl
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
 

Destaque

Static Analysis and AST Transformations
Static Analysis and AST TransformationsStatic Analysis and AST Transformations
Static Analysis and AST TransformationsHamletDRC
 
Презентация Программы лингвистического обеспечения города Сочи
Презентация Программы лингвистического обеспечения города СочиПрезентация Программы лингвистического обеспечения города Сочи
Презентация Программы лингвистического обеспечения города СочиABBYY Language Serivces
 
New Ideas for Old Code - Greach
New Ideas for Old Code - GreachNew Ideas for Old Code - Greach
New Ideas for Old Code - GreachHamletDRC
 
Is MT ready for e-Government? The Latvian Story. Indra Samite, Tilde
Is MT ready for e-Government? The Latvian Story. Indra Samite, TildeIs MT ready for e-Government? The Latvian Story. Indra Samite, Tilde
Is MT ready for e-Government? The Latvian Story. Indra Samite, TildeABBYY Language Serivces
 
Translation Automation Going Cloud: The New Landscape for Professional Transl...
Translation Automation Going Cloud: The New Landscape for Professional Transl...Translation Automation Going Cloud: The New Landscape for Professional Transl...
Translation Automation Going Cloud: The New Landscape for Professional Transl...ABBYY Language Serivces
 
Static Analysis in IDEA
Static Analysis in IDEAStatic Analysis in IDEA
Static Analysis in IDEAHamletDRC
 
33rd degree conference
33rd degree conference33rd degree conference
33rd degree conferencepcmanus
 
ELIA - Together: The growth from freelancer to translation company - Anja Jones
ELIA - Together: The growth from freelancer to translation company - Anja JonesELIA - Together: The growth from freelancer to translation company - Anja Jones
ELIA - Together: The growth from freelancer to translation company - Anja Jonesanjajones
 
The Elements of Service-Learning
The Elements of Service-LearningThe Elements of Service-Learning
The Elements of Service-LearningChelsea Montrois
 
Trabalhos finais oa12 ut6 2010 2011
Trabalhos finais oa12 ut6 2010 2011Trabalhos finais oa12 ut6 2010 2011
Trabalhos finais oa12 ut6 2010 2011amarques_1
 
Competency Statements
Competency StatementsCompetency Statements
Competency StatementsJessica Thyer
 
Castelao
CastelaoCastelao
CastelaoMarlou
 
Holistic Health Examination Dr Shriniwas Kashalikar
Holistic Health Examination Dr Shriniwas KashalikarHolistic Health Examination Dr Shriniwas Kashalikar
Holistic Health Examination Dr Shriniwas Kashalikarppkalghatgi
 

Destaque (20)

Static Analysis and AST Transformations
Static Analysis and AST TransformationsStatic Analysis and AST Transformations
Static Analysis and AST Transformations
 
Презентация Программы лингвистического обеспечения города Сочи
Презентация Программы лингвистического обеспечения города СочиПрезентация Программы лингвистического обеспечения города Сочи
Презентация Программы лингвистического обеспечения города Сочи
 
New Ideas for Old Code - Greach
New Ideas for Old Code - GreachNew Ideas for Old Code - Greach
New Ideas for Old Code - Greach
 
Is MT ready for e-Government? The Latvian Story. Indra Samite, Tilde
Is MT ready for e-Government? The Latvian Story. Indra Samite, TildeIs MT ready for e-Government? The Latvian Story. Indra Samite, Tilde
Is MT ready for e-Government? The Latvian Story. Indra Samite, Tilde
 
Translation Automation Going Cloud: The New Landscape for Professional Transl...
Translation Automation Going Cloud: The New Landscape for Professional Transl...Translation Automation Going Cloud: The New Landscape for Professional Transl...
Translation Automation Going Cloud: The New Landscape for Professional Transl...
 
Static Analysis in IDEA
Static Analysis in IDEAStatic Analysis in IDEA
Static Analysis in IDEA
 
33rd degree conference
33rd degree conference33rd degree conference
33rd degree conference
 
Vamos ubuntar
Vamos ubuntarVamos ubuntar
Vamos ubuntar
 
ELIA - Together: The growth from freelancer to translation company - Anja Jones
ELIA - Together: The growth from freelancer to translation company - Anja JonesELIA - Together: The growth from freelancer to translation company - Anja Jones
ELIA - Together: The growth from freelancer to translation company - Anja Jones
 
Aquaprofit - Chinese
Aquaprofit - ChineseAquaprofit - Chinese
Aquaprofit - Chinese
 
example 4
example 4example 4
example 4
 
The Elements of Service-Learning
The Elements of Service-LearningThe Elements of Service-Learning
The Elements of Service-Learning
 
Periodismo político (1)
Periodismo político (1)Periodismo político (1)
Periodismo político (1)
 
Trabalhos finais oa12 ut6 2010 2011
Trabalhos finais oa12 ut6 2010 2011Trabalhos finais oa12 ut6 2010 2011
Trabalhos finais oa12 ut6 2010 2011
 
example 5
example 5example 5
example 5
 
Competency Statements
Competency StatementsCompetency Statements
Competency Statements
 
Castelao
CastelaoCastelao
Castelao
 
Holistic Health Examination Dr Shriniwas Kashalikar
Holistic Health Examination Dr Shriniwas KashalikarHolistic Health Examination Dr Shriniwas Kashalikar
Holistic Health Examination Dr Shriniwas Kashalikar
 
Task
TaskTask
Task
 
JTTRANS
JTTRANSJTTRANS
JTTRANS
 

Semelhante a 10 Years of Groovy

Faceted Search – the 120 Million Documents Story
Faceted Search – the 120 Million Documents StoryFaceted Search – the 120 Million Documents Story
Faceted Search – the 120 Million Documents StorySourcesense
 
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...Guillaume Laforge
 
Macros in system programing
Macros in system programingMacros in system programing
Macros in system programingBrijesh__patel
 
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...Yauheni Akhotnikau
 
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...Aman Kohli
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate WorksGoro Fuji
 
Sql Saturday Spatial Data Ss2008 Michael Stark Copy
Sql Saturday Spatial Data Ss2008 Michael Stark   CopySql Saturday Spatial Data Ss2008 Michael Stark   Copy
Sql Saturday Spatial Data Ss2008 Michael Stark Copymws580
 
Meetup cassandra for_java_cql
Meetup cassandra for_java_cqlMeetup cassandra for_java_cql
Meetup cassandra for_java_cqlzznate
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomyDongmin Yu
 
marko_go_in_badoo
marko_go_in_badoomarko_go_in_badoo
marko_go_in_badooMarko Kevac
 
Implementing pattern-matching in JavaScript (short version)
Implementing pattern-matching in JavaScript (short version)Implementing pattern-matching in JavaScript (short version)
Implementing pattern-matching in JavaScript (short version)François-Guillaume Ribreau
 
The Ring programming language version 1.8 book - Part 51 of 202
The Ring programming language version 1.8 book - Part 51 of 202The Ring programming language version 1.8 book - Part 51 of 202
The Ring programming language version 1.8 book - Part 51 of 202Mahmoud Samir Fayed
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 
Exploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your pluginsExploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your pluginsMarian Marinov
 
Storing 16 Bytes at Scale
Storing 16 Bytes at ScaleStoring 16 Bytes at Scale
Storing 16 Bytes at Scalefabxc
 
Grooscript gr8conf
Grooscript gr8confGrooscript gr8conf
Grooscript gr8confGR8Conf
 
SPARQLing Services
SPARQLing ServicesSPARQLing Services
SPARQLing ServicesLeigh Dodds
 
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...Ruby Meditation
 
Go 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoGo 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoRodolfo Carvalho
 

Semelhante a 10 Years of Groovy (20)

Faceted Search – the 120 Million Documents Story
Faceted Search – the 120 Million Documents StoryFaceted Search – the 120 Million Documents Story
Faceted Search – the 120 Million Documents Story
 
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
 
Macros in system programing
Macros in system programingMacros in system programing
Macros in system programing
 
Oracle on AWS RDS Migration - 성기명
Oracle on AWS RDS Migration - 성기명Oracle on AWS RDS Migration - 성기명
Oracle on AWS RDS Migration - 성기명
 
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
Shrimp: A Rather Practical Example Of Application Development With RESTinio a...
 
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate Works
 
Sql Saturday Spatial Data Ss2008 Michael Stark Copy
Sql Saturday Spatial Data Ss2008 Michael Stark   CopySql Saturday Spatial Data Ss2008 Michael Stark   Copy
Sql Saturday Spatial Data Ss2008 Michael Stark Copy
 
Meetup cassandra for_java_cql
Meetup cassandra for_java_cqlMeetup cassandra for_java_cql
Meetup cassandra for_java_cql
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
marko_go_in_badoo
marko_go_in_badoomarko_go_in_badoo
marko_go_in_badoo
 
Implementing pattern-matching in JavaScript (short version)
Implementing pattern-matching in JavaScript (short version)Implementing pattern-matching in JavaScript (short version)
Implementing pattern-matching in JavaScript (short version)
 
The Ring programming language version 1.8 book - Part 51 of 202
The Ring programming language version 1.8 book - Part 51 of 202The Ring programming language version 1.8 book - Part 51 of 202
The Ring programming language version 1.8 book - Part 51 of 202
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Exploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your pluginsExploiting the newer perl to improve your plugins
Exploiting the newer perl to improve your plugins
 
Storing 16 Bytes at Scale
Storing 16 Bytes at ScaleStoring 16 Bytes at Scale
Storing 16 Bytes at Scale
 
Grooscript gr8conf
Grooscript gr8confGrooscript gr8conf
Grooscript gr8conf
 
SPARQLing Services
SPARQLing ServicesSPARQLing Services
SPARQLing Services
 
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
Postgres vs Elasticsearch while enriching data - Vlad Somov | Ruby Meditaiton...
 
Go 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoGo 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX Go
 

Mais de HamletDRC

AST Transformations at JFokus
AST Transformations at JFokusAST Transformations at JFokus
AST Transformations at JFokusHamletDRC
 
Java Boilerplate Busters
Java Boilerplate BustersJava Boilerplate Busters
Java Boilerplate BustersHamletDRC
 
Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)HamletDRC
 
AST Transformations
AST TransformationsAST Transformations
AST TransformationsHamletDRC
 
Java Boilerplate Busters
Java Boilerplate BustersJava Boilerplate Busters
Java Boilerplate BustersHamletDRC
 
Ast transformations
Ast transformationsAst transformations
Ast transformationsHamletDRC
 

Mais de HamletDRC (6)

AST Transformations at JFokus
AST Transformations at JFokusAST Transformations at JFokus
AST Transformations at JFokus
 
Java Boilerplate Busters
Java Boilerplate BustersJava Boilerplate Busters
Java Boilerplate Busters
 
Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)
 
AST Transformations
AST TransformationsAST Transformations
AST Transformations
 
Java Boilerplate Busters
Java Boilerplate BustersJava Boilerplate Busters
Java Boilerplate Busters
 
Ast transformations
Ast transformationsAst transformations
Ast transformations
 

Último

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

10 Years of Groovy

  • 1.
  • 4.
  • 8.
  • 12.
  • 13.
  • 14.
  • 15. “Refactored CompositeString to be called ______ :)”
  • 16.
  • 17.
  • 18.
  • 19. new groovy.xml.MarkupBuilder().root() { ( 1 .. 3 ).each { child(id: &quot;child $it &quot; ) } }
  • 20. new groovy.xml.MarkupBuilder().root() { ( 1 .. 3 ).each { child(id: &quot;child $it &quot; ) } } <root> <child id='child1' /> <child id='child2' /> <child id='child3' /> </root>
  • 21.
  • 22.
  • 23.
  • 24. def text = '''Dear $person, So nice to meet you in <% print city %>. Sincerely, $signed''' def vars = [person: 'JUG' , city: 'Geneva' , signed: 'Hamlet' ] def engine = new groovy.text.SimpleTemplateEngine() engine.createTemplate(text).make(vars)
  • 25. def text = '''Dear $person, So nice to meet you in <% print city %>. Sincerely, $signed''' def vars = [person: 'JUG' , city: 'Geneva' , signed: 'Hamlet' ] def engine = new groovy.text.SimpleTemplateEngine() engine.createTemplate(text).make(vars) Dear JUG, So nice to meet you in Geneva. Sincerely, Hamlet
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. String. class .metaClass.default = { self -> self ?: '<unknown>' } '' .default()
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. @Grab( group= 'org.ccil.cowan.tagsoup' , module= 'tagsoup' , version= '1.2' ) import org.ccil.cowan.tagsoup.Parser def parser = new XmlParser(new Parser()) def url = 'http://twitter.com/hamletdrc' def html = parser.parse(url)
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. def (x, y) = [ 1 , 2 ] @Singleton, @Lazy, @Immutable, @Delegate, ... and more
  • 51. def (x, y) = [ 1 , 2 ] assert x == 1 assert y == 2
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62. Command Chains stand 7.minutes at busstop ride 10.stops on bus towards Basel
  • 63. JSON Builder import groovy.json.* def json = new JsonBuilder() json.person { name 'William Tell' status 'mythological' }
  • 64. AST Transformations @ToString, @EqualsAndHashCode @TupleConstructor, @Canonical @Log, @Field, @Package, ... and many more
  • 65.
  • 66.
  • 67.
  • 68.
  • 69. void method(String message) { if (message != null ) { log.info( &quot;Received input: ${ message.toUppercase() }&quot; ) } }
  • 70. @groovy.transform.TypeChecked void method(String message) { if (message != null ) { log.info( &quot;Received input: ${ message.toUppercase() }&quot; ) } }
  • 71. @groovy.transform.TypeChecked void method(String message) { if (message != null ) { log.info( &quot;Received input: ${ message.toUppercase() }&quot; ) } } 1 compilation error: [Static type checking] - Cannot find matching method java.lang.String#toUppercase() at line: 4, column: 43
  • 72. void method(Object message) { if (message instanceof String) { log.info( &quot;Received input: &quot; + message.toUpperCase() ); } }
  • 73. @groovy.transform.TypeChecked void method(Object message) { if (message instanceof String) { log.info( &quot;Received input: ${ message.toUpperCase() }&quot; ) } }
  • 74. def keys = [x: 1 ,y: 2 ,z: 3 ] *.key def values = [x: '1' ,y: '2' ,z: '3' ] *.value keys*.toUpperCase() values*.toUpperCase()
  • 75. Dimension d1 = [ 100 ] Dimension d2 = [ '100' , '200' ] Dimension d3 = new Dimension( width: 100 , height: 100 , depth: 100 )
  • 76. @groovy.transform.TypeChecked – Not a static compiler – No new syntax – No new semantics – Bytecode not changed – Targeted at Java developers
  • 77. def v = 1 v = v.toString() println v.toUpperCase()
  • 78. Flow Sensitive Typing def v = 1 v = v.toString() println v.toUpperCase()
  • 79. Flow Sensitive Typing def v = 1 v = v.toString() println v.toUpperCase() – Under discussion
  • 80. int fib(int i) { i < 2 ? 1 : fib(i - 2 ) + fib(i - 1 ) }
  • 81. @groovy.transform.CompileStatic int fib(int i) { i < 2 ? 1 : fib(i - 2 ) + fib(i - 1 ) }
  • 82. @groovy.transform.CompileStatic – Is a static compiler – No new syntax – Requires new semantics – Bytecode is changed
  • 83. @groovy.transform.CompileStatic – Is a static compiler – No new syntax – Requires new semantics – Bytecode is changed – InvokeDynamic?
  • 84.