Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some of my old co-workers are working with this language because of Guidewire products. Initially the benefit was that you could write code with lambdas that would share a JVM with the product itself, but now that Java 8 has them, the only reason to keep Gosu around is that all that legacy code.

You would never choose Gosu unless you were working with Guidewire products.



That's probably true today, but we are aiming to get to a spot where you could choose to use Gosu alongside Java, rather than replace it wholesale. Gosu does have some features that make it very nice in some contexts when contrasted with Java.

A very simple, but amazingly useful example is properties, which have the useful behavior of being both l-values and r-values. Easy to implement, but Java doesn't have them.

Another useful differentiator are feature references:

  var methodRef = someInstance#someMethod()
which have all sorts of interesting applications as a sort of type-safe reflection syntax.

And so on.


Java 8 lambdas are not real lambdas, they capture only effectively final local variables. In Gosu you can modify the value of a captured variable.


They are real lambdas. They're not real closures.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: