Gosu – A pragmatic language for the JVM
gosu-lang.github.io
Gosu – A pragmatic language for the JVM
1–10 of 79 posts
Re: Gosu – A pragmatic language for the JVM
#2e.g.:
Ruby
[1, 2, 3].map { |x| 2 * x }
Gosu
{1, 2, 3}.map (\x -> 2 * x)
Unlike Ruby, Gosu provides a static type system which includes type inference and structural typing (similar to Go's interfaces). It also includes an open type system (http://devblog.guidewire.com/2010/11/18/gosus-secret-sauce-t...), which allows first-class representations of user created types at compile time – no code generation is needed. F# programmers would find many similarities between Gosu's open type system and F#'s type providers.
Like most JVM languages, you can leverage Java compatibility to use all of the third-party libraries you want. Compared to Scala, Gosu tends to eschew complexity for simplicity and pragmatism. Their implementation of generics is a good example of this.
And of course, Gosu just has a lot of features that make it enjoyable to work with. Such as the null-safe invocation operator (?.), elvis operator (?:), type variable reification, terse syntax, etc.
Re: Gosu – A pragmatic language for the JVM
#3The only thing that I didn't like at first glance was that closures aren't explicitly delimited:
print( strings.where( \ s -> s.length() > 3 ).sort() )
This looks like it could get ugly very fast if you want to write any kind of non-trivial closures. (Which is some of the same criticism that python often gets, and from which one could learn)."if", "for", "using" and all the other standard constructs use curly braces around the code - why not lambdas too? Hey, they even call them "Blocks" in the documentation (http://gosu-lang.github.io/docs.html#blocks)
Re: Gosu – A pragmatic language for the JVM
#4Re: Gosu – A pragmatic language for the JVM
#5Re: Gosu – A pragmatic language for the JVM
#6Re: Gosu – A pragmatic language for the JVM
#7I'm a developer on the project.
We are going through an open-source reboot with Gosu, moving all development out onto Github, and the current site and release isn't 100% ready for prime time, but I guess it's too late for that now...
I'm happy to answer any questions anyone has.
Also, we are working on a web micro-framework called SparkGS:
http://sparkgs.github.io/
which is a wrapper around the excellent SparkJava library.Re: Gosu – A pragmatic language for the JVM
#8Something seems amiss with their 'Play' page ( http://gosu-lang.github.io/play.html ). The Hello World template printed 'gosu' hundreds of times.
Re: Gosu – A pragmatic language for the JVM
#9Something seems amiss with their 'Play' page ( http://gosu-lang.github.io/play.html ). The Hello World template printed 'gosu' hundreds of times.
I saw that. The site isn't 100% ready for primetime (we are mid-reboot of the open source effort) so, yeah... pardon our dust. :)