Linked by Thom Holwerda on Wed 10th Nov 2010 18:56 UTC, submitted by fran
Java "Programmers in the Java environment have another tool in their box, following the launch of a new programming language called Gosu. Publicly released by Guidewire Software, Gosu is a general purpose programming language that runs on the Java Virtual Machine. According to the developers, Gosu is an object-oriented language that is 100% compatible with Java and has a promising set of attributes compared to other JVM languages. For example, Gosu boasts solid IDE tooling and static typing (meaning variables don't have to be defined before they're used), which remain rare in the world of JVMs."
Order by: Score:
static typing
by stestagg on Wed 10th Nov 2010 19:31 UTC
stestagg
Member since:
2006-06-03

I'm pretty sure that static typing has little to do with type inference.

Reply Score: 3

RE: static typing
by sukru on Wed 10th Nov 2010 19:40 UTC in reply to "static typing"
sukru Member since:
2006-11-19

Actually it probably does:

http://en.wikipedia.org/wiki/Type_inference

Type inference refers to the ability to deduce automatically the type of a value in a programming language. It is a feature present in some strongly statically typed languages....

Reply Score: 2

RE[2]: static typing
by stestagg on Wed 10th Nov 2010 19:44 UTC in reply to "RE: static typing"
stestagg Member since:
2006-06-03

Sorry, I'd forgotten how literal one has to be on osnews. Of course they're related, but the statement:

static typing (meaning variables don't have to be defined before they're used)


is a bit misleading.

Reply Score: 6

RE[3]: static typing
by boofar on Wed 10th Nov 2010 20:32 UTC in reply to "RE[2]: static typing"
boofar Member since:
2008-04-23

That was probably supposed to say the type of variables don't have to be defined before they're used.

Reply Score: 1

RE[4]: static typing
by vrwarp on Thu 11th Nov 2010 04:36 UTC in reply to "RE[3]: static typing"
vrwarp Member since:
2010-11-11

He means that the blurb is wrong to say that static typing MEANS type inference. You can have strong static typing but not type inference (look at Java <= 6 and C++ < 0x).

While it is true that you can't have type inferencing in a meaningful way without strong static types, the other way around is not true.

Reply Score: 1

RE[5]: static typing
by sukru on Fri 12th Nov 2010 02:16 UTC in reply to "RE[4]: static typing"
sukru Member since:
2006-11-19

Yes, you said this better than I did.

Static typing bring so much information to the compiler, it both enables very good type inference (just look at F# or other functional languages doing), and pretty good compiler time checks.

Reply Score: 2

RE[2]: static typing
by fithisux on Thu 11th Nov 2010 07:30 UTC in reply to "RE: static typing"
fithisux Member since:
2006-01-22

Gosu is like Matlab/Octave/Scilab. Type inference boosts productivity but it is a double edged sword.

Reply Score: 2

Fantom
by bogomipz on Wed 10th Nov 2010 22:16 UTC
bogomipz
Member since:
2005-07-11

After a two minute look, it seems pretty similar to Fantom.

Reply Score: 3

Comment by talaf
by talaf on Wed 10th Nov 2010 22:26 UTC
talaf
Member since:
2008-11-19

They are obviously targeting the large starcraft playerbase ;)

Reply Score: 3

RE: Comment by talaf
by neticspace on Wed 10th Nov 2010 22:31 UTC in reply to "Comment by talaf"
neticspace Member since:
2009-06-09

For people who don't know, gosu means a skilled game player or athlete in Korean. Literally means a person with an upper hand.

Reply Score: 3

RE[2]: Comment by talaf
by t3RRa on Thu 11th Nov 2010 03:37 UTC in reply to "RE: Comment by talaf"
t3RRa Member since:
2005-11-22

I was about to describe the meaning as well.. actually doesn't need to be a game player or an athlete. "gosu"(고수) is just like "guru". You can be a "gosu" on any kind of work, play or something non physical; e.g. gosu of love, gosu of chess, gosu of typing, gosu of wasting time ;)

Anyway, it is quite exciting for me(Korean background) to see some of projects adopting Korean words like suhoshin of php and this gosu language and etc. ;) I am about to go and have a look at the syntax and referecen if there are any.

Reply Score: 1

RE: Comment by talaf
by Valhalla on Thu 11th Nov 2010 12:46 UTC in reply to "Comment by talaf"
Valhalla Member since:
2006-01-24

They are obviously targeting the large starcraft playerbase ;)

Yes, I now want a special keyword called 'Jaedong' which will automatically improve code performance tenfold!!!

Reply Score: 2

RE[2]: Comment by talaf
by MamiyaOtaru on Fri 12th Nov 2010 02:13 UTC in reply to "RE: Comment by talaf"
MamiyaOtaru Member since:
2005-11-11

Yes, I now want a special keyword called 'Jaedong' which will automatically improve code performance tenfold!!!

would be fine until it has to compete with Flash

Edited 2010-11-12 02:13 UTC

Reply Score: 2

opposite?
by reduz on Wed 10th Nov 2010 22:44 UTC
reduz
Member since:
2006-02-25

"static typing (meaning variables don't have to be defined before they're used". Isn't it the opposite?

Reply Score: 2

RE: opposite?
by vrwarp on Thu 11th Nov 2010 04:38 UTC in reply to "opposite?"
vrwarp Member since:
2010-11-11

No. You're thinking about dynamic typing. Type inferencing in this case is really just getting rid of redundancy.

So instead of saying:
Arraylist<int> blah = new ArrayList<int>();

Just say:
val blah = new ArrayList<int>();

Which is *okay* because by looking at the right side of the equal sign, the compiler can statically figure out the type of the variable.

Reply Score: 1

RE[2]: opposite?
by nt_jerkface on Thu 11th Nov 2010 07:46 UTC in reply to "RE: opposite?"
nt_jerkface Member since:
2009-08-26


Which is *okay* because by looking at the right side of the equal sign, the compiler can statically figure out the type of the variable.


Yes but there is a downside which is that it takes longer for humans to step through inferred code.

Reply Score: 2

RE[3]: opposite?
by bogomipz on Thu 11th Nov 2010 09:04 UTC in reply to "RE[2]: opposite?"
bogomipz Member since:
2005-07-11

If you insist on figuring out the exact type of every variable, then perhaps.

If you don't, then less types in the code means less overhead for your brain.

Reply Score: 2

RE[4]: opposite?
by nt_jerkface on Thu 11th Nov 2010 15:17 UTC in reply to "RE[3]: opposite?"
nt_jerkface Member since:
2009-08-26

Understanding variables is part of stepping through code.

With type inference there is less for new programmers to learn but when it comes to reading code your brain ends up doing more work especially as a program increases in size.

Reply Score: 2

RE[5]: opposite?
by bogomipz on Thu 11th Nov 2010 22:43 UTC in reply to "RE[4]: opposite?"
bogomipz Member since:
2005-07-11

This is where the "if you insist" part comes into play.

We live in different worlds. I'm used to dynamically typed languages, and very seldom have a problem with not having any type information what so ever in the code. I think static typing has benefits in the tool support department, but not so much for me understanding the code. Perhaps once in a while I would like to see the type of a variable. Ultimately, I would then be able to ask the IDE and it would come back with the inferred type. The rest of the year, explicit types in the code only stand in the way and mean extra work for me as a developer.

Reply Score: 2

RE[3]: opposite?
by google_ninja on Thu 11th Nov 2010 14:15 UTC in reply to "RE[2]: opposite?"
google_ninja Member since:
2006-02-05

I find "dumbassEnterpriseyNamedClass= new DumbassEnterpriseyNamedClass()" _far_ easier to read then "DumbassEnterpriseyNamedClass dumbassEnterpriseyNamedClass = new DumbassEnterpriseyNamedClass()", especially when that is nestled in the middle of 20 other similar statements. It's not so bad when classes don't have names that stretch on forever, but for some reason people who use verbose languages tend to love to embrace that aspect and run with it.

Reply Score: 2

RE[4]: opposite?
by nt_jerkface on Thu 11th Nov 2010 14:50 UTC in reply to "RE[3]: opposite?"
nt_jerkface Member since:
2009-08-26

Well it sounds like you have been reading Java which is one of the worst in that regard.

The readability issue becomes apparent when skimming through code to figure out what it does. Type deceleration makes it easier to quickly focus on and keep track of important variables. I've stepped through VB.NET code (DIM DIM DIM DIM) that would have taken me half as long in C# or C++.

Reply Score: 2

Seems interesting enough...
by Tuishimi on Thu 11th Nov 2010 02:22 UTC
Tuishimi
Member since:
2005-07-06

...but not enough to draw me from groovy. It claims to have better performance because the variables are statically typed but I don't really use groovy for performance (altho' it isn't bad). It does (to my eye) appear to integrate a little more cleanly with Java than something like JRuby and of course the form is familiar like Java and Groovy and C... etc.

I thought it was interesting that looping constructs seem more limited - or force you into a more list processing point of view.

I downloaded it anyway, of course. ;)

Reply Score: 2

RE: Seems interesting enough...
by Tuishimi on Thu 11th Nov 2010 06:30 UTC in reply to "Seems interesting enough..."
Tuishimi Member since:
2005-07-06

The other thing that caught my eye was the increment operator... which isn't REALLY an increment operator at all, but a complete assignment statement in function.

So i++ really translates to i = i + 1 (it is not really an unary operator to Gosu). It cannot, therefore, be used in the middle of an expression.

I think that is confusing - why even offer it?

Reply Score: 2

Any unique features?
by ndrw on Thu 11th Nov 2010 06:11 UTC
ndrw
Member since:
2009-06-30

Can anyone say what differentiates this language from Java, Scala or Groovy? To me, it looks like something in between of Java and Scala. Does it have any unique features?

It has closures, type interference and type extensions but these are already available in other more established JVM languages.

The comparison table (http://gosu-lang.org/comparison.shtml) is questionable. Not only it's cherry-picking features available in Gosu but also presents them in a biased form (static vs. dynamic typing, "not lisp") or outright lies ("Solid IDE tooling").

Reply Score: 1

RE: Any unique features?
by moondevil on Thu 11th Nov 2010 09:05 UTC in reply to "Any unique features?"
moondevil Member since:
2005-07-08

I for one will stay with Scala/Clojure/Groovy for the JVM, nothing new to see here.

But it is nice to see people investing on the JVM anyway.

Reply Score: 2

Laughing
by deathshadow on Thu 11th Nov 2010 10:32 UTC
deathshadow
Member since:
2005-07-12

That they omit semicolons as 'unnecessary' (when they can be used to concatenate lines) while using VAR as a single line declaration with no multi-line/multi-var format... Hey, Mr. Joke...

Shades of the old L1 BASIC LET statement.

Otherwise though, it screams 'let's make Javascript run in JVM' -- not seeing anything 'fresh' about it.

Of course NOT having strict typecasting or the need for forward declaration in my book is NOT something to 'boast' about -- but I'm a Wirth language fan so...

Edited 2010-11-11 10:40 UTC

Reply Score: 2

RE: Laughing
by nt_jerkface on Thu 11th Nov 2010 15:27 UTC in reply to "Laughing"
nt_jerkface Member since:
2009-08-26

Otherwise though, it screams 'let's make Javascript run in JVM' -- not seeing anything 'fresh' about it.


Ugh, and that will be the appeal.

Have you created some Javascript textbox snippets? You can now start working on a JVM based word processor!

The keyword here is start.

Reply Score: 2

RE: Laughing
by JeffS on Thu 11th Nov 2010 18:38 UTC in reply to "Laughing"
JeffS Member since:
2005-07-12

Javascript already runs on the JVM. The implementation is called Rhino.

And Gosu looks nothing like Javascript, other than both have the "C" heritage, and share some features.

Reply Score: 2

JeffS
Member since:
2005-07-12

One of the developers of Gosu just did a presentation at my local (Sacramento, CA), Java User Group.

Gosu looks very very interesting.

Some things I like:

Static typing (unlike Groovy), for compiler checks, and IDE/editor code completion.

Easy to learn and read (unlike Scala).

Support for both OOP and Functional Programming.

Support of C#-ish cutting edge features like lambdas, extension methods, and delegates (although a Gosu delegate is a bit different than a C# delegate).

So, it looks like it has potential. The developer said they've been using Gosu internally and with their customer base (multi-billion dollar insurance companies) for a long time, but they are now open sourcing to help create a buzz, and get more people knowing the language.

So Gosu support will be strong - backed up by a company that sells to multi-billion dollar insurance companies.

In other words, it won't just be a "toy" or "hobby" or "intellectual language weenie" project. It's got real usage, and real reason for existence (a particular niche, but hopefully that will expand with open sourcing).

Reply Score: 2

Bill Shooter of Bul Member since:
2006-07-14

My experience with Open sourced code from a company that just has one huge customer, is that the really obscure features that are needed for that app for the giant customer are added, but none of the ones that would make sense for more general purposes.

Reply Score: 2

prexer Member since:
2010-11-15

Full disclosure, I'm one of the guys at Guidewire. One of the things that we've done right over the 9 years that we've been building enterprise software, is that we've never built a language feature just for one customer. GEICO, Liberty Mutual, and about 80 other insurance companies have been convinced that our software is solid, and that they're going to invest in training 100's of their own developers to use Gosu.

I totally understand why you'd be skeptical, but we're very pragmatic about the features we do put in. They can't be just useful to a couple language nerds.

Reply Score: 1

Comment by sukru
by sukru on Fri 12th Nov 2010 02:21 UTC
sukru
Member since:
2006-11-19

This will be slightly critical of the language, but I'm also open to responses from the OSNews community.

First a perspective: recently I've been trying to get on with the new languages. What I've seen with in F# is amazing -- it's so good MS is building newer C# versions around it.

I'm also looking at Clojure and Scala on the Java side, but they're not ready for the prime time -- at least for me. That does not mean they bring very good ideas on the table.

But looking at the examples of Gosu, it seems like they're borrowing heavily from C# with a slightly different syntax. For example, the using statement, or the lambda declarations are very C# like. Or general library improvements are a catchup to CLR libraries and LINQ.

If this is the case, why bother if you can use the real thing? (Even in JVM via third party converters).

Or am I over simplifying the situation?

Reply Score: 2

RE: Comment by sukru
by JeffS on Fri 12th Nov 2010 16:41 UTC in reply to "Comment by sukru"
JeffS Member since:
2005-07-12

Why bother? Simple. So you can use those goodies on other platforms besides Windows, or .Net. I'm not knocking those, but lots of people prefer choice of platforms as well as vendor.

And give credit where credit is due. Ander Hejlsberg and his team at MS have done a fantastic job of designing and evolving C#.

And unfortunately, Java (the language) has fallen behind.

However, the JVM itself is a fantastic, wonderful feat of software engineering, and a great platform to run on, and loaded with huge, fantastic, libraries.

Java (the Language) being behind the times, + the JVM (the runtime/platform) being a wonderful platform and great engineering = need for other JVM languages. Enter Scala, Groovy, JRuby, Jython, Clojure, and now Gosu. And some of these are already well into large production environments - Groovy and Grails, Scala + Lift, JRuby, etc.

This is where the excitement of Java lies - JVM + newer JVM languages.

Edited 2010-11-12 16:41 UTC

Reply Score: 2

RE[2]: Comment by sukru
by sukru on Fri 12th Nov 2010 18:11 UTC in reply to "RE: Comment by sukru"
sukru Member since:
2006-11-19

You're right, I agree that there is still value in the Java platform.

However with the real thing, I mean the thing itself. You can actually use C# with JVM. For example:

* Grasshopper lets you use C# to directly write JVM code. It was expensive, but I think it became free: http://dev.mainsoft.com/Default.aspx?tabid=29

* Stab (another open source project) is already an implementation of a C# like language on the JVM: http://code.google.com/p/stab-language/

* As a side note, IKVM lets you do the reverse: Java JAR -> .Net DLL conversion, thus you can employ Java libraries in .Net project

And there could be others. That's why I'm questioning the novelty of this new language.

Reply Score: 2

RE[3]: Comment by sukru
by carsongross on Sat 13th Nov 2010 17:17 UTC in reply to "RE[2]: Comment by sukru"
carsongross Member since:
2010-11-13

Hi Guys,

I'm one of the gosu developers, the guy who gave the presentation to the SacJUG.

So, yeah, Gosu isn't revolutionary in many ways: it takes good ideas from C#, Ruby, etc. and then tries to be a very smooth lateral transition for java developers. It is statically typed mainly to support tooling (code competion, etc.) It has a few interesting features, such as a delegate keyword that allows you to implement interfaces with a field, which allows for easy compositional programming ("Favor composition over inheritance" the experts always tell me.)

It also has automatic downcasting after a type test:

var foo : Object = "foo"
if( foo typeis String ) {
print( foo.capitalize() ) // <-- automatically downcast to String
}

These are small things, but nice.

The core innovation of the language is the Open Type System, which allows frameworks to generate Domain Specific Type Systems. It's effectively a formalized and simple to understand metaprogramming system that gives library and framework developers a heck of a tool. Scott McKinney, the father of the language, will be putting a post up on this concept soon here:

http://guidewiredevelopment.wordpress.com/

If you are a JVM programmer or someone who likes to dabble in lots of languages, Gosu is worth watching.

Also, for the concerns that this language might be too oriented towards a particular client: don't worry. Gosu is a general programming language that used in all sorts of ways by Guidewire. The commercial support increases the chance that it won't go away. (Guidewire actually makes money, this isn't a vanity project.)

I'm happy to answer any questions or comments.

Reply Score: 1