Greach 2013

Actualización sobre el estado de Groovy 2.0

Cédric Champeau  · 

Presentación

HTML (pincha para descargar)

Vídeo

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

like it down there sorry yeah okay so I'm not Guillen I'm sorry but I'm French so you have half of the funny thing of grief so just this page is this about me the most important thing is just that you can follow me here just to have these slides

I will post the URL where you can have the sides of this presentation and also you can have access to a previous presentation talks that I gave in other conferences and first of all I'm really happy to be here just it's my first keynote so first time

in the conference in Madrid first keynote is just a pleasure for me so thank you for inviting me to do this kingdom but just before we start and we have a little surprise for you so the first surprise indeed is the figures of the number of downloads are groovy

so this is the news today for the conference you have groovy 21 released official so for those who have access to internet you should have an email saying that groovy is released thank you so this talk is going to be about groovy too because I think last year

you did not have any talk of every tube and of course groovy 21 so first groovy tube how many people in the room already use groovy to not so much okay you know about anything groovy to novelties yes now okay so the first big change in groovy too is that we

have modules the previous versions of groovy were were very heavy you know you had to download a char where you have support for swing for support or external support for a lot of stuff but people don't use every feature groovy so we had a lot of requests

to have a smaller core and modules that you can add just to add support for I think I'm just going to try to speak without the match it's just horrible can you hear me ok so we have now modules that you can activate just to add support for several

features of groovy so this is a little picture of the groovy modules that you can find so we have the groovy core and you have several modules that come on top of Greek or that were the previous features that were open to greek or and now are separated into

several modules I again yeah okay is it better right thank you so you have a lot of modules the ID is just that no you can pick just whatever you want in groovy but just doing that we also added a feature which is really interesting which is the extension

modules in groovy and meaning you can write your own modules and what is really interesting here is that you can add some features to the language transparently just as groovy does with for example URL that get text you know it's a method that doesn't

doesn't exist in url class Ruby adds it to URL and you can add your own methods to groovy and use it using this feature which is extension modules so this is a really nice feature that is not yet and I would say very used but i really encourage you to

test that feature it's really interesting so the idea is that you can write classes that look like categories everybody knows about categories yeah so categories you just write methods with static modifier you define a class which is the instance to which

you add a feature then the parameters and here we just define a new method on the string class which is called shift which takes one argument which is number and we're just rolling the string so using food that shift you just added a new feature to the

language just by defining this class okay so this is not magical for this to work oh sorry yeah you can also define static methods to in a separate file separate class it's not most important so for this to happen you just have to define one file which

has to be on class path and that defines your extension module and this extension module will be loaded by groovy at startup and all methods will be automatically registered so if you want to see real life examples of extension modules i really suggest that

you read tin Yates extension modules he wrote to extension modules one is for lazy streams which is a really really nice experiment for lazy iterations you know not having to create a whole list in memory just consume it lately and he also created a second

gate hybrid repository which is new extensions to the language so take a look at those and make your own so the second improvement in Ruby two is about jdk 7 support in general so in jdk 7 you have small announcements to the drummer of java that we wanted

to have in groovy but the nice thing is that groovy still supports jdk 15 for example okay so you have the features of jdk 17 into byte code which is compatible to compatible with jdk 1815 sorry so you can use for example the binary representation of numbers

using OB you also have the underscores in two literals she's nice to have to know the couch which is even more interesting in my opinion something that was really missing in the language so you just don't have to copy multiple catch blocks just because

you don't have a common superclass for the those exceptions and JDK 17 introduces a new feature that is hidden to use this but which is really interesting for us designers of the language which is invoked dynamic support how many people in the room know

about invoke dynamic yeah ok so it's Noble that for you you don't really know what is vitally week because invoke them a dynamic basically is something that is useful for us to implement a language but for the user it doesn't change anything for

[ ... ]

Nota: se han omitido las otras 2.580 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.