Slashdot Mirror


Gosu Programming Language Released To Public

llamafirst writes "Guidewire Software released the Gosu programming language for public availability. Gosu is a general-purpose programming language built on top of the Java Virtual Machine (JVM). It is object-oriented, static typed, imperative, and 100% Java compatible (use/extend Java types, implement Java interfaces, compile to Java bytecode). It has type inference (very readable code yet static typing!), in-line functions that you can pass as objects (closures / lambda expressions / blocks), enhancements (inject methods + properties, even on Java types!), and simplified generics. Gosu is provided via the Apache License v2.0. The language itself is not yet open source, although that is planned for a future community release. You can read a complete introduction to the Gosu language, a comparison to other languages, and syntax differences from Java."

3 of 330 comments (clear)

  1. Re:Sounds like Scala by NightWhistler · · Score: 4, Informative

    OK, replying to myself because I obviously didn't have enough coffee yet:

    They list as the benefits over Scala
      - Extensible type system
      - Easy transition from Java
      - Reified Generics

    From those 3 points, only the last one sounds useful...

    --
    PageTurner Reader: open-source e-reader for Android with cloudsync. http://pageturner-reader.org
  2. Epic type system fail - universal covariance by shutdown+-p+now · · Score: 5, Informative

    The introduction has this gem:

    Gosu supports a simplified version of generics. Generics are a way to abstract the behavior of a class to work with different types of objects, but to still retain type safety. There are no wildcards, and generic types are covariant, like Java arrays, which is usually what you want.

    And here's how to make the type system bite the dust with this flaw:

    uses java.util.*;
    var xs : List<Object> = null;
    var ys = new ArrayList<String>();
    xs = ys; // type system allows this blatant LSP violation
    xs.add(123); // we just added an integer to a list of strings - great
    print(xs.get(0)); // yeah, this prints 123 - just to be sure
    ys.get(0).length(); // finally, a ClassCastException which should've happened 3 lines earlier

    What's funny is that Eiffel has already fallen into the very same trap, and is still trying to dig itself out of it.

  3. Re:Alright! by carsongross · · Score: 3, Informative

    We aren't trying to sell anything to anyone. Well, unless you happen to be an insurance carrier. I assume not.

    We just released our language, and are excited about it.