lunes, 7 de noviembre de 2011

Gosu

Gosu es un lenguaje que corre sobre la jvm, y tiene las siguientes características:

  • 100% orientado a objetos
  • tipado estático
  • es imperativo
  • 100% compatible con java
  • inferencia de tipos
  • soporta closures
  • generic simplificados
  • y con licencia Apache 2.0!


Veamos un ejemplo:


// Declare some data
var minLength = 4
var strings = { "yellow", "red", "blue" }

// Slice and dice the data using blocks
print( strings.where( \ s -> s.length() >= minLength )
              .sort()
              .join( ", " ) )

// Use standard java classes
var someFile = new java.io.File( "SomeFile.txt" )

// But with shiny new methods
someFile.write( strings.join( "\n" ) )


Dimos un pequeño vistazo a este lenguje, dejo links:

http://gosu-lang.org/
http://gosu-lang.org/intro.shtml
http://gosu-lang.org/examples.shtml

No hay comentarios.:

Publicar un comentario