Oh man. Nice string interpolation. Can shell script with a shebang. All those little niceties like the `.?` operator. Map literal definitions. Type inferring declarations (like golang: strongly typed, but not wearing out your keyboard). "enhancements"... very interesting, deserve a full paragraph. And I'm just cherrypicking my favorite features; there's so many more.<p>"enhancements" feel like monkeypatching in that they let you attach things to existing classes for pretty code. This left me sweating at first -- implementations of features like this in ruby seems to be a large part of why the language is both challenging as you add devs (I recently saw one class spanning 4 files and 3 <i>gems</i>, I don't even) and frankly slow, and scala has similar performance barriers brought on by 'implicits' [1] and their ilk. But in gosu, enhancements appear to be defined in an statically disbatchable way so there's zero runtime timewasting, and they're also only valid for your syntactical convenience, they don't complicated inheritance or interface fitting. Looks like all the beauty, none of the sticky mess. Very interesting.<p>Compatibility looks like a better story than some of the alternatives -- both groovy and scala always felt to me like their mechanics encouraged an extend+extinguish feeling to their libraries because of the radical overhaul or complete dismissing of types, whereas gosu looks like you could sanely call it from java. I (as a purely personal observation; others may disagree) found I could never write a groovy or scala library and ask a java developer to use it with a straight face, and with gosu, it looks like maybe I can!<p>I'm speaking as someone who's just seeing the language for the first time today, so perhaps my enthusiasm will be modified by practical experience later... but I'm seeing a lot to love both in the examples and in the general philosophy of pragmatism. A language that lets me do more with fewer characters while not giving up ground on compile-time checks and performance is <i>exactly</i> what I want to see more of. I look forward to playing with this!<p>If any gosu developers are here, my biggest single beef right now is I can't instantly see from your docs what my process is like if I'm going to ship a jar. I assume it can be done and it's not hard to script, but it would be great to see up front, because if that isn't smooth, then my impressions of using it to ship a library usable from other java projects (or feed it into cross compilers, etc) is impacted. I found some docs at [2], but it appears to mostly talk about shell script style usage; ctrl-f for "jar" hit nothing. Perhaps I just haven't looked hard enough yet :) (Also, that help site is one of those annoying things where there's no content without javascript, and even after allowing it, middle click gives me some sad snippet of javascript instead of opening the page I wanted. The rest of your site looks great; I hope the wave of design refresh is going to wash over here soon too.)<p>[1] <a href="https://stackoverflow.com/questions/3606591/why-does-intellij-idea-compile-scala-so-slowly/3612212#3612212" rel="nofollow">https://stackoverflow.com/questions/3606591/why-does-intelli...</a><p>[2] <a href="https://gosu-lang.github.io/doc/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Gosu%20Reference%20Guide/getting-started-gosu-opensource.04.3.html#1496914" rel="nofollow">https://gosu-lang.github.io/doc/wwhelp/wwhimpl/js/html/wwhel...</a><p>Edited: to note that my spate of points-to-love at the top is by no means exhaustive.
Hey Everyone,<p>I'm a developer on the project.<p>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...<p>I'm happy to answer any questions anyone has.<p>Also, we are working on a web micro-framework called SparkGS:<p><pre><code> http://sparkgs.github.io/
</code></pre>
which is a wrapper around the excellent SparkJava library.
I'm fairly new to the language, as it hasn't been mentioned much since it's public release several years ago. The language takes many queues from Ruby; for example, "enhancements" are similar to monkey patching in Ruby. The syntax, semantics, and standard library (especially in collections) are also familiar.<p>e.g.:<p>Ruby<p>[1, 2, 3].map { |x| 2 * x }<p>Gosu<p>{1, 2, 3}.map (\x -> 2 * x)<p>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 (<a href="http://devblog.guidewire.com/2010/11/18/gosus-secret-sauce-the-open-type-system/" rel="nofollow">http://devblog.guidewire.com/2010/11/18/gosus-secret-sauce-t...</a>), 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.<p>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.<p>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.
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.<p>You would never choose Gosu unless you were working with Guidewire products.
From a quick glance, this looks very nice and well thought-out.<p>The only thing that I didn't like at first glance was that closures aren't explicitly delimited:<p><pre><code> print( strings.where( \ s -> s.length() > 3 ).sort() )
</code></pre>
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).<p>"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 (<a href="http://gosu-lang.github.io/docs.html#blocks" rel="nofollow">http://gosu-lang.github.io/docs.html#blocks</a>)
One fair comment that comes up frequently is that, with Java 8 out, Gosu's closure support is less of a win. Certainly true, so let me mention some other high-level features Gosu has that contrast favorably with Java:<p>* Type-safe reflection with feature literals<p>* Embedded classpaths in programs, including maven coordinates<p>* Integrated type-safe templates<p>* Pragmatic extension methods on the core java data structures via enhancements<p>* Null-safe operators<p>* Mixin support via the delegate keyword<p>* Implicit interfaces, like Go<p>* Type-safe templates built into the langauge<p>* Properties support (seems small, but it makes a big difference in day to day coding.)<p>And, of course, the Open Type System, which is essentially an API for introducing new types to the gosu compiler:<p><a href="http://devblog.guidewire.com/2010/11/18/gosus-secret-sauce-the-open-type-system/" rel="nofollow">http://devblog.guidewire.com/2010/11/18/gosus-secret-sauce-t...</a><p>All at least interesting, if not compelling.
Mildly interesting. Gosu definitely has some features that would be nice in Java, and would have been impressive 10 years ago, but here and now, it just looks like a slightly different spin on a dozen other languages I have seen before.<p>It would be very helpful if the creators made a page (linked to right from the home page) explaining their philosophy and guiding principles, and how their design differs from other languages in the same space. Don't tell us fluffy things like "we choose simplicity over complexity". #1, that is not a trade-off. #2, "simplicity" is such a vague and overused word that it's hard to know what you mean. (What I think they mean by "choosing simplicity" is: keeping the feature set and number of syntactic constructs small.)<p>Another point: "For the JVM" is a 2-edged sword. If I see a programming language described as "for the JVM", it would make me think twice about investing the time to learn it. The JVM is good technology and I do make use of it, but for reasons I won't detail here, I don't want to be locked in to it.<p>"Can run on the JVM" is a different matter. "The compiler has a JVM backend, among others" is great. "Currently runs only on the JVM, other backends are coming" is OK.<p>If Gosu was specifically designed for very tight integration with Java, such that it wouldn't make sense to separate it from the JVM, that is a design trade-off and should be explained on the "design rationale" page I suggested above.
At (insert swear word here) last!<p>"The classpath can also include Maven coordinates, and Gosu will automatically resolve and download them at runtime:<p><pre><code> #! /path/to/gosu
classpath "../src,org.gosu-lang.gosu:sparkgs:0.1.0"
print( "Here is a library object: ${new SweetLibraryObject()}")</code></pre>
"<p>Been writing java for 14 years and I've never had a nice way to run scripts.<p>Now if you can work natively (tougher than folk think) with JSON I'd be very happy indeed. That would include supporting fully de-typed data not nasty schema based data binding. I've switched to NodeJS/JS because they speak the language of the web (not JS, but JSON). But I can't see why other languages can't learn to.
Very cool. I'm starting a JVM-based project, and I'd love to use this in the places where I was planning to use JRuby. Besides being impressed overall, two pieces of feedback:<p>* On enhancements, I very much like C# extensions design, partially because I <i>do</i> have to import them explicitly. One of the things I dislike in Ruby is that you don't know where your methods come from, and that gets more complicated when they're actually from third-party gems. If a jar is giving me an enhancement, how does that work? How do I handle name conflicts?<p>* I'd love to have some built-in support for shell commands, a la Ruby's tick marks.
Another in the long line of languages that are created to solve a problem that doesn't exist. Even worse, created as a way to force P&C carriers to be tightly coupled to a proprietary piece of software. With one industry being the only relevance for the language and that industry with usually the worst IT technical talent available.<p>I get it, Guidewire has some very talented engineers. Probably at least a few of the best in the valley. However, you're pushing it out to the dregs of the IT world and hoping to make it fly and gain adoption when those using it are generally just drawing a paycheck for the pulse their body maintains.
I've tried to figure out for a while why the creators think this language is more practical than, say, Java. They don't seem to answer that directly. To me, it looks too much like other languages I already know. I'm not that impressed with their feature laundry list. That makes me wonder, why I should care about Gosu.
Something seems amiss with their 'Play' page (<a href="http://gosu-lang.github.io/play.html" rel="nofollow">http://gosu-lang.github.io/play.html</a>). The Hello World template printed 'gosu' hundreds of times.
It's interesting to see that Gosu was announced here two years ago without a single comment.<p><a href="https://news.ycombinator.com/item?id=3671054" rel="nofollow">https://news.ycombinator.com/item?id=3671054</a>
I'd like it you could set what class this<p>var strings = { "red", "green", "blue" }<p>uses. In some clean way.
eg I don't want List, I want ArrayList.
This language is only used by GuideWire people. And whoever talks about it positively are GuideWire employees.<p>It was called GScript before. The creators of the language did it because they could, but then some consultant dude gave them the idea to write an insurance application on it. They wrote Guidewire claims center, plus a bunch of proprietary development tools to support the language. Do I have to say what went wrong?<p>Anyway, eventually they found it was too hard to maintain the language and keep any traction on it, so they open sourced it and called it Gosu.<p>I spent a lot of time with this thing. My best advice is: stay away from it.