Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Gosu Programming Language Released To Public

Soulskill posted more than 3 years ago | from the hello-public dept.

Programming 330

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."

cancel ×

330 comments

If your shit is so fucking awesome (-1, Flamebait)

Anonymous Coward | more than 3 years ago | (#34170818)

why am I reading your doco in Flash?

Wonder how this turns out... (1, Interesting)

IronSight (1925612) | more than 3 years ago | (#34170826)

With the news recently on how java is going to be changing in oracle's hands, people seem pretty nervous in just the java side side of things let alone a language that runs over java. Will be interesting to see how this develops.

Re:Wonder how this turns out... (0, Troll)

symbolset (646467) | more than 3 years ago | (#34171280)

The epitaph will read "and nothing of value was lost."

Re:Wonder how this turns out... (4, Insightful)

kaffiene (38781) | more than 3 years ago | (#34171364)

You have to be some kind of uber noob to think that Java and the ecosystem it has engendered could ever be called "nothing of value". There are more jobs in Java and open source projects on Source Forge in Java than in any other language. Java is not everyone's cup of tea - neither are other significant languages like C or LISP, but to pretend that Java, like any of these languages offers "nothing of value" is either arrogance or ignorance beyond belief.

I know that /. no longer caters to a technically literate crowd but you take the cake. I feel stupider for even bothering to reply to you.

Alright! (1, Interesting)

Anonymous Coward | more than 3 years ago | (#34170832)

Ads disguised as news! excellent.

Re:Alright! (0)

Anonymous Coward | more than 3 years ago | (#34171396)

because a new programming language is of no interest to nerds, right? you do realise that this is from Apache, so hardly a commercial advertisement, right?

Re:Alright! (1)

icebraining (1313345) | more than 3 years ago | (#34171480)

No, this is from Guidewire Software. It's says right there in the first two words. It's licensed under the Apache license.

But it's still free (in both senses of the word), so I don't get GP's complaint.

Sounds like Scala (3, Insightful)

NightWhistler (542034) | more than 3 years ago | (#34170834)

From a quick glance it looks like Scala with a more Java-like syntax... I wonder what added benefit they hope to bring.

I'd be very interested to see an in-depth comparison of the two.

Re:Sounds like Scala (4, Informative)

NightWhistler (542034) | more than 3 years ago | (#34170848)

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...

Re:Sounds like Scala (0)

Anonymous Coward | more than 3 years ago | (#34170906)

It has a lot of features Java 8 will presumably have but looks almost like C#. I wonder if they're not running into problems with Microsoft there.

Still missing (1)

a_claudiu (814111) | more than 3 years ago | (#34171000)

Still missing const

Re:Still missing (1)

shutdown -p now (807394) | more than 3 years ago | (#34171066)

Why do you need it in a Java-like?

Re:Sounds like Scala (1)

shutdown -p now (807394) | more than 3 years ago | (#34171056)

I haven't read the docs yet, but how can they claim reified generics and full Java compatibility?

Re:Sounds like Scala (1)

Chrisq (894406) | more than 3 years ago | (#34171356)

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...

Except that reified generics are available in Scala using manifests [scala-blogs.org] . I am not sure what the "extensible type system" means but there are various ways of adding to a type system in Scala. However I agree on not being an "Easy transition from Java". Scala is not really an easy transition from anything!

Re:Sounds like Scala (0)

Anonymous Coward | more than 3 years ago | (#34171510)

No, Scala doesn't have reified generics. You can get something like reified generics in Scala using manifest that covers some cases. In addition, Scala manifest are experimental, and not a stable part of the language and there is no schedule for when they will be (I still use them though.)

Re:Sounds like Scala (1)

Chrisq (894406) | more than 3 years ago | (#34171518)

No, Scala doesn't have reified generics. You can get something like reified generics in Scala using manifest that covers some cases. In addition, Scala manifest are experimental, and not a stable part of the language and there is no schedule for when they will be (I still use them though.)

True, you have to implement reified generics yourself using manifest. I have not found any limitations myself yet, but I have to admit that I have only done simple reified type collections.

Re:Sounds like Scala (1)

DrXym (126579) | more than 3 years ago | (#34171514)

From a quick glance it looks like Scala with a more Java-like syntax... I wonder what added benefit they hope to bring.

Well if it were a superset of Java then the answer to that should be obvious. I sense people are getting seriously fed up with Oracle / Sun's glacial development schedule as well as all the legal shenanigans. Java 7 is the Duke Nuke Em of language iterations. If someone produces a Java with extensions (almost like C++ was C with classes originally) then they might jumpstart development again and free it from the withered claws of Oracle.

I realise of course that there are lots of languages vying to be Java++ (e.g. Groovy, Scala, Clojure etc.). I expect in the end that like C++ vs Objective C that it won't necessarily be the most elegant solution that wins, but the most practical. It will be the one which allows people to preserve most of their existing codebase and provide a seamless transition to something better. The disadvantage to Gosu is it appears to be closed source and that would kill it stone dead as far as most developers would be concerned.

"Not Lisp" (-1, Troll)

guyminuslife (1349809) | more than 3 years ago | (#34170844)

Any language that supports the paradigm of "Not Lisp" is certainly worthy of our consideration.

(Just watch, today is the day that all of the Lispers get mod points. There's a reason it's called karma.

(This statement failed to execute because it's missing parentheses.)

PEOPLE OF EARTH: this is spam (-1, Flamebait)

Anonymous Coward | more than 3 years ago | (#34170856)

And as I dig down: this is a straight lift of 'Go', or rather of the Go website, that I can only assume to be designed to draw pageviews.

FUCK YOU FUCK YOU FUCK YOU.

And where's the editorial fucking control over this whirlwind of bullshit, anyway?

Re:PEOPLE OF EARTH: this is spam (1)

MichaelKristopeit162 (1934888) | more than 3 years ago | (#34171094)

And where's the editorial fucking control over this whirlwind of bullshit, anyway?

you haven't heard?

slashdot = stagnated

Re:PEOPLE OF EARTH: this is spam (1)

pieterh (196118) | more than 3 years ago | (#34171236)

Apart from the way the names 'Gosu' and 'Go' overlap and are both derived from the board game, what similarities do you see between the gosu-lang.org and the golang.org websites?

Re:PEOPLE OF EARTH: this is spam (1)

shutdown -p now (807394) | more than 3 years ago | (#34171242)

After briefly glancing through the docs, this language has absolutely nothing to do with Go. I'm not even sure what you mean by "lift of the website" in this context. The design is completely different, and so is the contents.

Yay yet another way too say "Hello World" (1)

JDmetro (1745882) | more than 3 years ago | (#34170880)

The following Gosu program outputs the text "Hello World" to the console using the built-in print function: print("Hello World")
http://c2.com/cgi/wiki?HelloWorldInManyProgrammingLanguages

Equivalent to ABAP or Peoplecode (1, Informative)

Anonymous Coward | more than 3 years ago | (#34170882)

Guidewire is an enterprise software company, and this is the language they most likely code most of their business logic in.

Similar to SAP or Peoplesoft (now owned by Oracle), to keep developer mindshare and promote maintainability and exclusivity, they layer on top of the J2EE stack in some way; in this case it's a bytecode compatible Java replacement (Peoplecode, in comparison, was an interpreter invoked by server calls in the J2EE stack - at least in v8.x).

I think the main reason they're exposing the language widely (as opposed to the above examples) is directly related to the recent Java news by Oracle... bytecode compatible is a key selling point here.

Re:Equivalent to ABAP or Peoplecode (0)

Anonymous Coward | more than 3 years ago | (#34171350)

I have no idea about what led to the timing of it happening now or the management decision to go ahead with it right now, but as a engineer who knows a lot of Guidewire people, they've been talking about "oh, we should open-source Gosu" for several years starting back when it was called GScript, and more recently "we're going to open-source Gosu, we're just waiting for all the legal and management stuff to be in order."

Similarly, no idea about how they sold the business case to management, but I'm pretty sure the idea started with some of the engineers working on it going "it would be cool if we could release this outside the company."

built on top of the Java Virtual Machine (0, Troll)

countertrolling (1585477) | more than 3 years ago | (#34170892)

I'm scared already... Is doing anything with Java safe these days?

Re:built on top of the Java Virtual Machine (2, Interesting)

phantomfive (622387) | more than 3 years ago | (#34170924)

The JVM is open source. The patents Oracle has are for the machine, not for compiling to byte code. They aren't Java specific either, anyone with a VM who does JIT compiling could fall under the patents, which is why Microsoft has to pay Oracle for a license.

In other words, since they are only compiling to byte code, and Oracle doesn't have any patents on that, and they can't (nor desire) to take away people's ability to use the JVM, this isn't a problem.

The misconception is that if Google hadn't used Java in Android they would have been ok, but if they had used a JIT compiler they likely would have fallen under the patents no matter what language they used.

Re:built on top of the Java Virtual Machine (2, Interesting)

MemoryDragon (544441) | more than 3 years ago | (#34171312)

It is rather questionable if JIT related patents can hold up in a courtcase, JIT compilation has been around since the 70s Smalltalk and Lisp have been using it for decades.

Another Language (4, Insightful)

phantomfive (622387) | more than 3 years ago | (#34170946)

At one time in my programming life I liked learning languages, I made it my goal to learn pretty near every interesting language from APL to FORTH.

Then one day I woke up and realized, it isn't the language, you can write good or bad code in any language. It's how you use the language, and how you organize the code that matters most. I realized as long as you have the ability to encapsulate, you can write good code in any language, even in assembly.

In fact, with a good macro library, I can write code just as fast and well in assembly as in any other language.

Or, on the other hand, maybe I've fallen into the trap represented by this saying, "The determined real programmer can write Fortran in any language." But I don't think so. :)

Re:Another Language (1)

mr_mischief (456295) | more than 3 years ago | (#34171026)

As long as you're not writing GW-Basic or COBOL in any language, I think you're not too far gone.

Re:Another Language (1, Insightful)

Anonymous Coward | more than 3 years ago | (#34171048)

You can write good code in any language but can (a) other people and (b) the compiler understand what you meant? The language enforcing the encapsulation you meant means that someone else using your code will be sure to follow it. Similarly a type system that lets you tell the compiler more about what is going on can allow for better optimizations.

You are probably right that without good style, it does not matter what language you use, but the language can help.

Re:Another Language (1)

phantomfive (622387) | more than 3 years ago | (#34171088)

You can write good code in any language but can (a) other people and (b) the compiler understand what you meant?

It's assembly, you don't need a compiler. :)

With comments and well-named labels and macros, assembly isn't too hard for a human to understand.

Re:Another Language (0)

Anonymous Coward | more than 3 years ago | (#34171112)

It's assembly, you don't need a compiler. :)

Uh...what?

Re:Another Language (1)

VortexCortex (1117377) | more than 3 years ago | (#34171234)

mov ax, 4c01
int 21h

Re:Another Language (1, Insightful)

Anonymous Coward | more than 3 years ago | (#34171268)

Hint: look up "assembler"

Re:Another Language (0)

Anonymous Coward | more than 3 years ago | (#34171740)

It's assembly, you don't need a compiler. :)

Yes, yes you do.

comments and well-named labels and macros

... are your first clues you're using a compiler. The fact that you're not writing your code purely as a series of binary values is the other clue.
The job of the compiler is to take all those strings of English characters, labels, comments, macros, and so on, and convert them into the raw binary values which are usually referred to as machine code. It's true that assembler is closer to machine code than any other interpreted language, but it's still interpreted.

Re:Another Language (5, Insightful)

Anonymous Coward | more than 3 years ago | (#34171064)

Perhaps it is tempting to see only encapsulation as the sine qua non in programming languages. However, a programming language does not merely make an algorithm machine readable, but also human readable (eg. yourself after 2 weeks). Therefor, the following properties are important:

- Conciseness: eg. Haskell is more suitable in representing certain algorithms, as part of the interpretter/compiler makes 'good' choices, you'd have to specify otherwise. The same goes for languages such as Prolog.
- Manipulatibility: to change a certain aspect of an algorithm (or of a whole system), we need a representation of this aspect. Aspect Oriented Programming, Lambda expressions and meta-object oriented programming are examples of this.
- Suitability to domain: whether a mathematician or a business process manager reads your code matters. Their experience and expectations differ.
- lots more...

Yes, all of it is reducable to a Turing Machine, but languages matter. A lot.

Re:Another Language (2, Insightful)

phantomfive (622387) | more than 3 years ago | (#34171168)

Indeed, those do matter.

My point is, if you give me sufficient encapsulation tools, I can write code that is concise, readable and manipulable. And it is something anyone can do.

Re:Another Language (0)

Anonymous Coward | more than 3 years ago | (#34171570)

Design errors, framework limitations and learning to use shiny new toys effectively, have consumed much more time on any given project I've seen, than the savings that an incremental "improvement" of Gosu over Java (or similar) can ever bring.

If Ford had to change all the Torx screws to Polydrive screws (assuming that Polydrive is somehow better), would that make a better car? Would decrease the cost of producing the first prototype?

Re:Another Language (3, Insightful)

OneSmartFellow (716217) | more than 3 years ago | (#34171106)

it isn't the language, you can write good or bad code in any language

But, VB makes writing bad code trivial, and writing good code challenging.

Re:Another Language (1)

Chrisq (894406) | more than 3 years ago | (#34171382)

it isn't the language, you can write good or bad code in any language But, VB makes writing bad code trivial, and writing good code challenging.

COBOL even more so

Re:Another Language (4, Insightful)

kaffiene (38781) | more than 3 years ago | (#34171440)

Exactly. Which is why this "all languages are equivalent" mantra is just so much bullshit. All languages have domains for which they are more or less suited.

I don't do script-like tasks in assembler, I don't do device drivers in Java, I don't write enterprise apps in Javascript or VB. Neither do most sane software engineers. This isn't a coincidence, it's because certain tools are better at certain jobs. People who argue that it doesn't matter what language you use cannot explain why good software engineers know why some languages are inappropriate for some jobs.

Re:Another Language (2, Insightful)

obarthelemy (160321) | more than 3 years ago | (#34171698)

Hey, I'm gonna try for an analogy that is neither cars nor pizzas. Let the mod points roll !

Languages are like MP3 players: some have strong points, extra features, nice ergonomics better price.. but in the end, what counts is the Apple-like ecosystems: users, developpers, tools, PR, content...

Judging a language on its own merits is nice and all, but in the end, wuality of the tool sets, docs, hype... are probably a bigger contributing factor.

Re:Another Language (1)

sardaukar_siet (559610) | more than 3 years ago | (#34171118)

You're right, it's not the language. But it's also a matter of comfort. Coding in Ruby or Python allows for more goodies out of the box. Your assembly macros are a tack-on - some languages have powerful mechanisms built right in. I'm not saying the goodies come without a price, but they're there.

Re:Another Language (2, Insightful)

SharpFang (651121) | more than 3 years ago | (#34171138)

ORG 0000h
    LCALL MACROLIB #initialize the macro library
                      #from now on, let's write some macros we have just defined.
    class HelloWorld {
        public static void main(String[] args)
        {
            System.out.println("Hello World!");
        }
    }
    LCALL EXECUTE
    JMP $

Re:Another Language (0)

Anonymous Coward | more than 3 years ago | (#34171562)

I disagree respectfully.

The language shapes the way you think and for example there's no way any normal person can write easily in C what is possible in Haskell.
If the abstractions aren't there, you'd have to write a whole new language interpreter/etc in your old language in order to get them, which is reimplementing Haskell anyway.

Now if you are talking about differences in languages of the same class of languages (i.e. Java and C#, Perl and Python, ...), there and only there the differences are negilible (like here, seems to be very similar to Java - so I agree, here there is no point).

Re:Another Language (1)

randomsearch (1207102) | more than 3 years ago | (#34171620)

> In fact, with a good macro library, I can write code just as fast and well in assembly as in any other language.

I really don't agree. We use high-level languages because they are easier to understand, they are more scalable and they generally enable code to be written quickly compared to low-level languages. Language choices do matter.

If it were true that language doesn't matter, wouldn't we all still be using assembly language?

RS.

Learning languages and their philosophies... (4, Insightful)

boorack (1345877) | more than 3 years ago | (#34171682)

Granted that not only you learn a language but also grasp philosophies/patterns/paradigms/etc. behind it, it's a Good Thing (TM) to learn new languages on regular basis. You need, however, learn much more than mere language.

It's good to learn some assembly languages to see how machines work.

It's good to learn C to get accustomed with low level things, pointer arithmetic, in-memory layout of code & data, OS internals and tons of other things. It's good to tinker and experiment with high performance C code, see how functions look disassembled. Try adding two matrixes row by row and then column by column and see performance differences etc.

It's good to learn C++ to get accustomed with it's metaprogramming facilities, learn how to implement semi-automatic memory management via smart pointers and how all these high level things interact with low level.

It's good to learn Java to get accustomed with that whole big world of objects, OOP patterns, TDD, exception handling strategies and tons of other things.

It's good to learn Scala to get smooth introduction into functional programming concepts (higher level functions, closures etc.) and see how it can be incorporated into traditional object oriented code and more interesting concurrency models (actor model for example).

It's good to learn Erlang to grasp functional programming even more, learn how to effectively use pattern matching, see the THE actor model implementation and learn about it's interesting error handling philosophy.

It's good to learn LISP to grasp it's macro system that still cannot be matched in any other language. See Common Lisp at work and Clojure for it's approach to parallelism, mutability and distinction between values and identities.

It's good to learn Haskell to see how to program in purely functional way and see monads in action.

Not that I'm in any way competent in all things above. Much of it (plus other things) is still on my TODO list. I'm still being surprised by new ideas showing blind spots of my ignorance on regular basis. I don't buy however that learning new languages doesn't matter anymore. It matters. It's important. Maybe we should choose new languages to learn more carefully, choose less but dig deeper.

Re:Another Language (3, Insightful)

icebraining (1313345) | more than 3 years ago | (#34171710)

How many lines do you need to emulate a Python's list comprehension statement in assembly? Even if you encapsulate, assembly simply doesn't let you express everything in the statement without a massive number of LOCs.

Higher level languages are more readable for higher level concepts. It's not the same.

Correction (0)

Anonymous Coward | more than 3 years ago | (#34170952)

Another programming dialect (Anonymous Coward yourself, it is too much complicated to used this weird comment system once logged in).

Are programs written in Gosu called Gosum? (0)

Anonymous Coward | more than 3 years ago | (#34170954)

n/t

Sounds like BS to me... (0, Troll)

BudAaron (1231468) | more than 3 years ago | (#34170990)

Seems to this old dude like we have too many languages already. Why another language? I understand the reason for multiple languages like English, French and Spanish for example but why in the hell do we need to keep inventing new programming languages? Just looks to me like one more severe case of rectal caranial inversion.

Re:Sounds like BS to me... (1)

phantomfive (622387) | more than 3 years ago | (#34171128)

lol you are not the first person to complain about that. Check out this picture from the 60s [insideria.com] . There were so many programming languages in days past that the DoD decided to standardize on one language, and not surprisingly did it by creating another language (ADA), to surpass them all. TCL was created with a similar motivation.

But look at the picture, if you recognize half those languages, you are pretty good. The languages most of use daily weren't even dreamed of when that picture was made. And so it goes, new languages come along, with new features, and most are forgotten, but occasionally someone comes up with a good idea that sticks around.

Re:Sounds like BS to me... (0)

Anonymous Coward | more than 3 years ago | (#34171160)

It is about competition of ideas. (For the same reason you should start political party if you think and want to do things different.) It could become the next best thing since sliced bread. It could also be interesting from to point of programming languages research; it might not survive as whole but some of its ideas might inspire others. Its implementation could also show others how to implement JVM based language/compiler/interpreter. Etc. Whether it succeeds or fails or just becomes a niche language, its existence contributes to the wealth of knowledge.

Re:Sounds like BS to me... (1)

shutdown -p now (807394) | more than 3 years ago | (#34171342)

why in the hell do we need to keep inventing new programming languages?

On one hand, the ones we have are not perfect. On the other hand, there is as yet no agreement as to what a perfect one would look like. Hence many people take many different ways towards what they see as perfection.

On the other hand, there are still quite a lot unresolved language design problems - mainly to do with type systems. Until those are dealt with, it's not clear if perfection is even attainable.

Re:Sounds like BS to me... (1, Insightful)

Anonymous Coward | more than 3 years ago | (#34171716)

I'm all in favour of new programming languages but it's true that there are a lot around at the moment. That's why it's really important to provide a concise explanation of why you created a language when you release it to the world. What were the aesthetics informing your design decisions. What key features do you think are really important that sets it apart from its peers (ideally a short explanation of the benefit of those features too).

Gosu didn't seem to have such a clear mission statement, which makes it very difficult to know if I'm interested or not.

From what I can glean from the website a lot of Gosu seems to be about adding obvious and much needed improvements to Java, which is fine as far as it goes, but there needs to be a bit more to be truly interesting. Along those lines, I think Scala goes further and is so far more interesting to me.

Not Lisp? (1)

robi5 (1261542) | more than 3 years ago | (#34170998)

Gosu, your new name is GOSUB but please never come back.

Re:Not Lisp? (1)

scdeimos (632778) | more than 3 years ago | (#34171362)

I wish I had points...

Re:Not Lisp? (1)

MemoryDragon (544441) | more than 3 years ago | (#34171674)

Jepp the dreadful lisp syntax drove me away from clojure, how can anyone write a big system with such a mess of a syntax. There are functional languages which are actually readable, lispish languages are definitely not one of those.

Run for the hills! (1)

MichaelSmith (789609) | more than 3 years ago | (#34171046)

Its new age cobol. I can hear the PHB now. If we use and instead of && our secretary will understand how to code and we'll save milions!

Re:Run for the hills! (1)

francium de neobie (590783) | more than 3 years ago | (#34171082)

If we use and instead of && our secretary will understand how to code and we'll save milions!

Watch out for when your secretary learns to fly, then - for she's coding in Python and she's gonna import antigravity!

Re:Run for the hills! (1)

MichaelSmith (789609) | more than 3 years ago | (#34171194)

If we use and instead of && our secretary will understand how to code and we'll save milions!

Watch out for when your secretary learns to fly, then - for she's coding in Python and she's gonna import antigravity!

Well I hope she remembers to indent correctly.

Re:Run for the hills! (3, Funny)

shutdown -p now (807394) | more than 3 years ago | (#34171360)

As a geek, you should actually prefer "and", because it is quicker to type than "&&" - it does not engage Shift, and it does not require pressing the same key twice (which requires waiting for release after the first press). Same for "or" vs "||".

Re:Run for the hills! (2, Funny)

MichaelSmith (789609) | more than 3 years ago | (#34171424)

var1&&var2 works but var1andvar2 doesn't

Re:Run for the hills! (1)

shutdown -p now (807394) | more than 3 years ago | (#34171470)

var1&&var2 works but var1andvar2 doesn't

Well yes, you can write it all on one line as well. But if you really want to go that way, nothing beats APL.

Re:Run for the hills! (1)

Ragzouken (943900) | more than 3 years ago | (#34171642)

Try using spaces

Re:Run for the hills! (2, Interesting)

icebraining (1313345) | more than 3 years ago | (#34171724)

No, as I geek I prefer because "readability counts". Gains in productivity from key presses are irrelevant compared to the gains in productivity from understanding code as you skim it.

stop posting obvious untruths in stories. (0)

MichaelKristopeit118 (1933104) | more than 3 years ago | (#34171078)

It has type inference (very readable code yet static typing!)

if a type is EVER inferred, then the language is NOT statically typed. just because some preprocessor interpreter assigned a static type heuristically doesn't mean the language has anything to do with static typing... in fact, if the language ever infers type, that has EVERYTHING to do with DYNAMIC typing.

Re:stop posting obvious untruths in stories. (1, Informative)

Anonymous Coward | more than 3 years ago | (#34171214)

You missed out on the whole concept, and you're being aggressively dumb about it. Inferred types are derived from the code, which is, surprise, static. Type inference isn't heuristic at all, go and read about Hindley-Milner.

Re:stop posting obvious untruths in stories. (2, Informative)

shutdown -p now (807394) | more than 3 years ago | (#34171216)

if a type is EVER inferred, then the language is NOT statically typed. just because some preprocessor interpreter assigned a static type heuristically doesn't mean the language has anything to do with static typing... in fact, if the language ever infers type, that has EVERYTHING to do with DYNAMIC typing.

You might want to go tell the authors and users of ML (incl. OCaml) and Haskell that they're using dynamically typed languages. Somehow I'm sure they will be very open to this idea.

Re:stop posting obvious untruths in stories. (1)

kaffiene (38781) | more than 3 years ago | (#34171454)

Slashdot used to appeal to the technically literate. *sigh*

Re:stop posting obvious untruths in stories. (0)

Anonymous Coward | more than 3 years ago | (#34171746)

Nice to see it still appeals to condescending pricks who would rather waste their time denigrating someone instead of just as easily informing them though.

Very neat (1)

should_be_linear (779431) | more than 3 years ago | (#34171080)

it seems some very nice aspects of Java, Pascal, C# and Basic combined, with both compiler and runtime library problems elegantly solved.. This looks really good to me. And I am not big fan of new languages.

More comparisons are wanted (0)

Anonymous Coward | more than 3 years ago | (#34171090)

Comparing to other jvm languages is not so exciting any more. Why don't compare it to .net languages like Boo (http://boo.codehaus.org/) or Cobra (http://cobra-language.com/)?

Yuck!!! (2, Interesting)

gustgr (695173) | more than 3 years ago | (#34171096)

Phonetically gosu sounds identical to the Portuguese word "gozo", which literally means cum (as in ejaculation).

Re:Yuck!!! (1)

mister_handy (1807584) | more than 3 years ago | (#34171388)

Rock on. I just learned a new profanity in another language. I love Slashdot.

Re:Yuck!!! (1)

icebraining (1313345) | more than 3 years ago | (#34171728)

Only in Brazil. It has no such connotation in Portugal.

Re:Yuck!!! (2, Interesting)

gustgr (695173) | more than 3 years ago | (#34171754)

Interesting to know. Originally it was used in the same way as it is used in Spanish, meaning joy or pleasure (when a noun). In Brazilian Portuguese it has acquired the sexual connotation besides the usual meanings. Funny thing is that I just discovered that gozo means sweet in Basque.

Why bother? There are better alternatives (0)

Anonymous Coward | more than 3 years ago | (#34171142)

Gosu isn't much of a contender, when compared to other up-and-coming languages. C# has had implicitly-typed static-typing since 3.5 (or was it 3.0? More than a year ago, anyway), closures, better delegates (which allow for multicasting), extension methods (Gosu calls them 'enhancements'), LINQ, continuations, collection initialization syntax, object initialization syntax, properties, and anonymous types. 4.0 kicked it up a few notches with dynamic and covariant/contravariant reified generics. Some things in Gosu are nice, like intervals, the expansion operator, and delegated interfaces, but I wonder whether I'd use them often enough to justify a switch ... ... and I'm not even much of a C# user right now. The only reason I'm making the comparison to C# is because it's the most easily-comparable language that I know of. F# is way ahead (union types, pattern matching, fast functions, much better type inference, immutability), and that's what I've been using. Gosu doesn't stand a chance against that.

Epic type system fail - universal covariance (5, Informative)

shutdown -p now (807394) | more than 3 years ago | (#34171164)

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 [loria.fr] , and is still trying to dig itself out of it [eiffel.com] .

Re:Epic type system fail - universal covariance (1)

cryptoluddite (658517) | more than 3 years ago | (#34171252)

The really funny thing is that in practice all generics really need to do is prevent you from having to repeat casts everywhere, catch errors moderately soon, and aid in documentation. Which is what these do. The real 'trap' here is thinking that something has to be theoretically perfect to be useful or convenient.

Re:Epic type system fail - universal covariance (4, Insightful)

shutdown -p now (807394) | more than 3 years ago | (#34171294)

The really funny thing is that in practice all generics really need to do is prevent you from having to repeat casts everywhere, catch errors moderately soon, and aid in documentation. Which is what these do.

They don't let you "catch errors moderately soon" in many real scenarios. It's the same problem as implicit null value for reference types everywhere - end result is you can have one part of code returning null where it shouldn't, that null get quietly propagated throughout your system from component to component because no-one needs to do anything to it, and then it all finally blows up when some other code elsewhere receives a value that should not be null but is - and you end up with a NullPointerException and, often, no clue as to what code originally produced the invalid value.

Same thing here - someone, somewhere will create a collection of subtype, implicitly upcast it to supertype, and pass it over because they do not understand that List<Number> cannot always be substituted for any random List<Object> - because it's non-intuitive, despite being true (since add() is not covariant). All the evidence I need for this are all the questions asking about how to do just that in Java or C# on StackOverflow. When you ask people to post the code, it almost invariably turns out to be broken, and the type system did them a favor by rejecting it.

The real 'trap' here is thinking that something has to be theoretically perfect to be useful or convenient.

We're not talking about "theoretically perfect" here. We're talking about a language that's statically typed - the sole benefit of which is type safety unless explicitly overriden (by casts etc) - but which then forgoes this very benefit.

Furthermore, the only other language I'm aware of which has the same flaw is Eiffel. Neither Java nor C# nor any other language with generics has this. They all either have no variance at all (which is inconvenient by safe), or declaration-site variance (C# 4.0 "in" and "out" on type parameters) which is easier on the API client but does not let you express all relationships, or usage-site variance (Java generic wildcards) which requires API client to understand what it is all about.

Re:Epic type system fail - universal covariance (1)

rsmckinney (1936812) | more than 3 years ago | (#34171414)

Static typing is only useful when it *helps* us. In our view use-site variance via wildcards and the complexities that come with it confuse programmers -- no *help* from static typing there. Declaration site variance is less confusing to users, but has an impact on API design in terms of "in" / "out" data. In other words the degree to which one has to change and understand code is typically not worth the trouble, hence array-style variance. It tends to *help* users of libraries, not hinder, which is what static typing is all about. It's definitely a trade-off, but one we think is worth it.

Re:Epic type system fail - universal covariance (2, Interesting)

shutdown -p now (807394) | more than 3 years ago | (#34171494)

Fair enough. I still hold by my earlier assertion that this is the mistake of the same proportion and impact as nullable-types-by-default (about which there have been repeated published regrets by the very language designers which introduced them), but I do understand the argument from pragmaticism. Time will tell if your trade-off was worth it or not.

Then again, those who grok variance (and other advanced stuff) already have Scala, while Gosu could take the niche of a language that is not that far removed from Java (including the learning curve!), but still somewhat more convenient. On the other hand, you do introduce closures - which a lot of the very same people having troubles with variance and wildcards have problem wrapping their heads around - so I'm not sure if the overall balance is good enough for this niche.

Or whether the niche will even exist for much longer - after all, at some point OOP was that new-fangled academic concept, only present in exotic languages like Simula, and beyond the comprehension of mere mortals coding in FORTRAN or COBOL.

Re:Epic type system fail - universal covariance (1, Interesting)

Anonymous Coward | more than 3 years ago | (#34171588)

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 [loria.fr] , and is still trying to dig itself out of it [eiffel.com] .

Since when does the line xs=ys; not generate a warning?

Re:Epic type system fail - universal covariance (1)

renoX (11677) | more than 3 years ago | (#34171654)

Their main 'competitor' Scala (in my mind) has both covariant and contravariant type system.
So in the language comparison, they left out covariant and contravariant..
*Sigh*

call be back.... (5, Insightful)

batistuta (1794636) | more than 3 years ago | (#34171258)

>> The language itself is not yet open source,

ok, call me back once it is. I don't really need another programming language, let alone a closed-source once.

Gosu is an unrefined mix (1)

rdebath (884132) | more than 3 years ago | (#34171286)

Gosu is an unrefined mix of cobalt oxide, sodium and other minerals mined in China.

Yup, so very right.

YASBTJ (1)

slasho81 (455509) | more than 3 years ago | (#34171296)

Gosu is Yet Another Slightly Better Than Java programming language.

Re:YASBTJ (1)

MemoryDragon (544441) | more than 3 years ago | (#34171346)

Unless Sun/Oracle finally gets its act together and implements some language improvements, we will see another bunch of those languages. Properties have been requested for ages, closures have been discussed for how long. Dynamic reloading of classes for real hotswapping still is a pain in the arse. Java has done so many things right, but like many other sun technologies it falls short by 5% and then it takes ages to get it in out of the fear of breaking compatibility. I personally wonder if it would not be the time to introduce a java2.0 which tries to get rid of most problems by still maintaining the binary code compatibility. And even that can be covered by cross compilation. To me the Dalvik VM from a modern standpoint makes more sense on bytecode level than the registere based JVM.

Re:YASBTJ (1)

shutdown -p now (807394) | more than 3 years ago | (#34171376)

Properties have been requested for ages, closures have been discussed for how long.

AFAIK properties are not on the radar, but lambdas are coming in Java 8. You can track the work (both design and implementation - there's already code to try out) here. [java.net]

To me the Dalvik VM from a modern standpoint makes more sense on bytecode level than the registere based JVM.

It's Dalvik which is register-based (which makes fast interpreters easier to implement). JVM is stack-based.

Gosu! (1)

kenbo11 (1097593) | more than 3 years ago | (#34171320)

"But it IS a piece of Gosu!"

Re:Gosu! (1)

itsdapead (734413) | more than 3 years ago | (#34171668)

"But it IS a piece of Gosu!"

Don't worry: the language will probably be cancelled before it has a chance to really get going.

Anyway, that was my first thought too, then I wondered if it was an invitation to Oracle's lawyers...?

Online help browser sucks. (4, Insightful)

acooks (663747) | more than 3 years ago | (#34171436)

Gosu people, your help browser sucks caravans.

If I middle-click on a link, I don't want the page I'm currently reading to jump away. I want to read whatever is linked to _later_. Redirecting me and then breaking my browser's "Back" button, without even providing an alternative js back button, is unforgivable.

It is case-insensitive... (1)

art6217 (757847) | more than 3 years ago | (#34171448)

plEasE, pROgRAMmerS ArE jUst pEOpLe. One hopes for a language that clears the java crud like the half-fake generics [angelikalanger.com] , and gets a case-insensitive language instead...

Cool. Next, fix the VM (1)

Alkonaut (604183) | more than 3 years ago | (#34171452)

New languages for the JVM are cool and all, but still no syntax fixes the problems inherent in the JVM. Mainly, the lack of generics.

Re:Cool. Next, fix the VM (1)

MemoryDragon (544441) | more than 3 years ago | (#34171678)

The problem with generics are not on vm level, it is more the problematic implementation on javas side. The JVM after all is just assembler with high level constructs for classes and data types to some degree, it can scale to any generic implementation you can think of.

Wow... (1)

Vahokif (1292866) | more than 3 years ago | (#34171582)

They invented C#!

Not real (1)

DoofusOfDeath (636671) | more than 3 years ago | (#34171734)

Not real until you post its operational semantics!

Looks very interesting (1)

CaptnMArk (9003) | more than 3 years ago | (#34171748)

But I really like my semicolons (as much as lispers like their parenthesis)

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...