From: Andrea A. <and...@ge...> - 2011-04-13 06:44:19
|
On Wed, Apr 13, 2011 at 3:26 AM, Eric Sword via SF <es...@us...> wrote: > I had never heard of the GeoScript project, so I will check it out. Thanks > for the tip. I completely understand about not wanting to cause confusion > with too many languages. The one argument I would put forward for Groovy > over the others that you mentioned is that there is very little "syntactic > impedance" between it and Java compared to Java and other languages like > Python and Scala. You can be reading a unit test and not even realize it is > not Java until you see something like this: > > void testParseComplexFilter() { > List srsNames = ["EPSG:4326", "EPSG:4325", "EPSG:99999"] > srsNames.each { srcName -> > def xml = """ > > > > > SHAPE > > -85.693359375 -41.585665809419 > 90.087890625 44.203116178454 > > > > > """ > > def results = FilterEncoder.parse(xml) > assertTrue(results instanceof Filter) > ... > } > } > > which shows simple List creation, an iterator closure, and formatted > multi-line strings with template replacement. You have to admit, it looks a > lot nicer than a lot of String escaping, concatenating and such. But > that's just my little plug. I'll be quiet now. That's an extremely slippery slope, saying no to any language other than java is the only way. Otherwise we'll be trapped in discussing the benefit of xml literals in various scripting languages, the advances in the Scala actor model for concurrent programming and who knows what else. If I had to state a preference I'd go Scala, it's efficient, statically typed, and powerful. But I'm being realistic, Scala, or Groovy, or Jython, they can only be used in a brand new project where the team is all set going that way, the team is small and not likely to have much turn over. That's not GeoTools, nor GeoServer. The day I'll decide it's time to drop these projects and move on I'll certainly have a look at alternative languages, today... too much to do to inflict myself and the other members of the community a language war. My 2 cents ;-) Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- |