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."
why am I reading your doco in Flash?
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.
Ads disguised as news! excellent.
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.
PageTurner Reader: open-source e-reader for Android with cloudsync. http://pageturner-reader.org
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.)
I don't believe in time. It's a grand conspiracy designed to sell watches.
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?
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
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.
I'm scared already... Is doing anything with Java safe these days?
For justice, we must go to Don Corleone
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.
Qxe4
Another programming dialect (Anonymous Coward yourself, it is too much complicated to used this weird comment system once logged in).
n/t
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.
Gosu, your new name is GOSUB but please never come back.
Still missing const
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!
http://michaelsmith.id.au
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.
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.
839*929
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/)?
Phonetically gosu sounds identical to the Portuguese word "gozo", which literally means cum (as in ejaculation).
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.
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:
What's funny is that Eiffel has already fallen into the very same trap, and is still trying to dig itself out of it.
>> 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 of cobalt oxide, sodium and other minerals mined in China.
Yup, so very right.
Gosu is Yet Another Slightly Better Than Java programming language.
"But it IS a piece of Gosu!"
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.
plEasE, pROgRAMmerS ArE jUst pEOpLe. One hopes for a language that clears the java crud like the half-fake generics, and gets a case-insensitive language instead...
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.
They invented C#!
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.
Not real until you post its operational semantics!
But I really like my semicolons (as much as lispers like their parenthesis)
The JVM runs in more systems than the CLR. Assuming it's not too big, you could possibly use it on Android in the near future.
Dilbert RSS feed
So they opted for a switch statement that requires 'break' not to fall through to the next case. A bad inheritage I think.
How many times have you really used this fall through feature? Compare that to how many times you really want it to break. For me the outcome of that comparison is that break should be the default (i.e. should *not* need explicit 'break' marks) and fall through an option (explicit marks, 'continue' or something)...
To me it looks like or a combination of BASIC and Java, or Java in a much more readable form. I personally liked because I always had the opinion that Java works (if you ignore the fact that it uses RAM like water) but could have a more friendly syntax.
After all, a programming language syntax does not need to be "encrypted" to be effective.
Religion: The greatest weapon of mass destruction of all time
A quick look at the documentation shows that objects/classes are strongly typed, but scalars (i.e. integers) apparently are not. In my experience, you're much less likely to add Apples to Oranges, than you are to add Count of Apples to Count of Oranges. And that also holds true for scalar values used for array indexing, etc.
So it seems to me that no language should be called 'strongly typed' if it doesn't include a complete type system for scalar types.
Two weakest points of Java are:
1) Date/Time objects
2) Generics
as compared to C#/.Net -- having worked professionally in both. No langauge is going to fix these two.
(Though you can use Joda for date/time handling.)
I am sorry for saying this, and I say it with all good intentions, but this language seems completely uninteresting to me. There is already Scala, Closure, JRuby, and a myriad of other JVM languages.
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.
Yeah! You sure did tell them why it does matter though!
I use gscript every day - that's what Gosu is based on from their proprietary products. It's generally a useful language, with some time savers, but the devil is in the details. It causes otherwise good programmers to be lazy and make poor decisions, trusting that the language was written with performance in mind. It's not. And I'm constantly running into issues with the generics, enums, reflection, and other Java features.
I'm hoping they've fixed this stuff in Gosu, but until then, I'd stick with something a little more community supported like Groovy if you have the option.
Looks like C# for JVM. No?
ROFL
Ok, garbage collection.
. . . and portable byte code . . .
OK, OK, garbage collection and portable byte code.
uh, the JIT, yes, the JIT
Well alright, garbage collection, portable byte code, the JIT . . .
. . . and libraries. Lots and lots of libraries. And exception handling and stack traces tied to source-code line numbers. Used to be you had a runtime exception and you had to be up all night. We get to go home at night now.
Here we observe the later stage of the life cycle of the ancient javan fanboicus extremis. Scientists believe that the first of the species was born in the Sun Microsystems booth at a Comdex convention in the mid 1990s (reportedly from a fling between Grace Murray Hopper and James Gosling.) From there the species propagated by its strange inter-species relationship with management. Similar to the tape worm reproductive cycle (Taenia solium), the javan first infects the management of the organization by later stage infected programmers (salesmen) who have been infected coming in contact with management of the organization. Usually promises are made and buzzwords (the mating call of management) are dropped. Similar once again to the tapeworm life cycle the infection of a new host is caused by cysts being eaten. However, in this case those in the management cycle force feed the cysts to the programmer cycle. At first the new programmer recoils in disgust at the Javan experience. This is followed by the first sign of infection; browsing infective books and as the disease progresses - buying them. As the infection commences the programmer is told to like the experience, overriding any natural senses and instinct. In the second stage the programmer still has a mild distaste and at some basic level realizes they shouldn't be having the feelings they're feeling. In final stage infection the programmer can be seen tossing and turning in bed saying "pure java..... it .... must... be in .... pure java..." and things like that. During this stage it is common for programmers to begin writing everything in Java. Shortly afterward they begin reproducing by attempting to create other Java programmers. Although their chances of actual sexual reproduction go down significantly after infection.
It's easy to be immunized against javan infection, but no instant cure is now known. And immunize those you know and love. It's important to remember that ultimately this is a parasitic infection. Java causes many reams of code to be written in Java that should never be. It adds a minimum of 30% to development time. And contrary to typical management mating calls, because of the thousands more lines of code Java takes to express ideas, it costs many times more for long term support. Like COBOL before it, it rarely dies until the host dies. So the infection can only be prevented, not cured. Keep safe, and always use a prophylaxis.
I have a theory that the truth is never told during the nine-to-five hours. - Hunter S. Thompson
Just stop with the new (but just rearranged) same old languages:
Basic,
C,
C#,
C+,
C++,
COBOL,
Dyalog APL,
Eiffel,
F#,
Java,
Javascript,
Jscript,
Mercury,
Mondrian,
Oberon,
Pascal,
Perl,
Python,
Salford,
SmallTalk,
Standard ML,
VBscript,
Visual Basic,
VisualJ++,
Really...isn't it time to rethink all of these different, but same (except for the whacko Python,PHP stuff) and come up with one standard language? Extend it with different libraries if you want, but this dreaming up a new language that is pretty much the same as all the others except the line ends with ";" or you declare the type first instead of last or assignment is "=" except when it's "==". Or iterative structures that all work the same but all have different syntax? WTF people?
Think of all the talent locked up in someone who has done language A for 10 years but is totally useless to you because your project uses language B? The concepts are the same, yet people's knowledge is arbitrarily walled off in this development environment or that environment. How can this be considered good?
Innovation doesn't mean re-inventing the wheel.
When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
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...
You are kidding right? In reality-land, for better or worse, #2 is probably as important of all for a lot of Java shops as #3 if not more. Type erasure sucks balls, but we can get it to work (just as we were able to write good working code without generics.)
Adoption and ease of transition are things people tend to undervalue/underestimate. Being able to leverage a language with better qualities with as little code change as possible is certainly an enormous, practical incentive. For me, I would give an eye to work on something else (Scala, Ruby/Python on the VM or Clojure), but the reality on the ground is that something like Groovy (using the Groovy++ compiler, though) is the most likely candidate for adoption given its easier transition.
Gosu seems to embrace the good qualities of next gen JVM languages (and C#) without a substantial deviation to the syntax.
Necessary /. anti-fanboy disclaimer: Before the /. fanboy crowd displays their usual lack of reading comprehension, I'm not saying that Java syntax is superior or that the syntax sported by the other JVM languages is deficient or bizarre. I'm simply stating the fact that there is an associated, practical cost of transition (in terms of education, time of getting proficiency, possible introduction of coding errors, etc) that is proportional to the syntax differences that need to be overcome - this without considering the external pressures of writing software for solving problems in the right here and right now.
With infinite time and resources, and zero friction from requirement/requirement changes and organization dynamics, syntax differences would not matter. AFAIK, that is not the context in which programming shops operate. . Another important addition is the use of delegates. Oh my, I can only think of the possibilities we currently can only do in Java with a lot of boilerplate.
I know it can be difficult to select a name that sounds good and it's not (?)offensive(?) on all languages, but here is the thing about the name "Gosu":
"Gosu", in (BR) Portuguese, sounds exactly like "Gozo", which is one of the many names given to the byproduct of male ejaculation. On the other hand, in (PT) Portuguese, "Gozo" is the world for pleasure.
This thing runs on a JVM, and I derive no meaning of "Gozo" from that fact...
Is this some sort of straw man they are throwing out to see if Oracle will "Go sue" them? If not then what is the source of the name?
My boy, my boy!
The comment is only if you actually have extra code before the fall-through. For example, no comment here:
A case like this does:
The first case, although technicly fall-through, is not what I think of when I think of fall-through, since no extra code is executed.
For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
*whoosh*
My post was tongue-in-cheek, and it was coming from a Java programmer (me) of several years.
You're right, C++ sucks for enterprise application programming. Which is why it shouldn't ever be used for it. And for the same reasons that Java should never be used for it. Java and C++ suck at user interfaces. A person can only know this if they've both used Java and other more modern tools to create enterprise applications. See the link in my previous post for more details. It is the opposite of fast turn-around and rapid development. There are better, faster and less headache inducing ways now. Just look at how much Java IDEs suck at this, despite thousands of man-hours and great talent developing them. This is not the fault of the developers, this is the fault of the language. And it's time people begin progressing away from Java, in the same way we should avoid writing things in COBOL or APL.
The reaction to my post is kind of why I made it in the first place. Why be so upset when somebody criticizes your language? It seems to me to be a kind of fundamentalism. And the more crappy the religion the more angry and vicious are its fundamentalists.
I have a theory that the truth is never told during the nine-to-five hours. - Hunter S. Thompson
Gosu is Yet Another Slightly Worse Than Java programming language.
FTFY
Think of all the talent locked up in someone who has done language A for 10 years but is totally useless to you because your project uses language B? The concepts are the same, yet people's knowledge is arbitrarily walled off in this development environment or that environment. How can this be considered good?
Innovation doesn't mean re-inventing the wheel.
Sounds like inexperienced programmers. The first 10 languages you learn are challenging, after that it's all syntax and frameworks.
Now then, some languages are bundled with extremely baroque and quirky frameworks which can suck up most of your development time. But this language is actually doing it right - by being Java-compatible on the JVM, the programmer can recycle his Java Library knowledge. Parrot is another similar approach, where Perl, Python, Ruby, etc. programmers will be able to trade libraries.
The bigger problem list is probably:
JDK,
CPAN,
Gems,
STL,
PyPi,
etc.
These might be worse - they're largely duplication of labor, whereas the languages are at least trying to do something different.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
I am not sure what the "extensible type system" means
It means that you can add methods or properties to a class without subclassing it. This feature is one of the very few things that I actually like about Objective C.
http://gosu-lang.org/doc/wwhelp/wwhimpl/api.htm?&context=gosu&src=enhancements&topic=Using_Enhancements
It also means that Gosu supports custom type loaders that dynamically inject types into the language so you can use them as native objects in Gosu.
For example, custom type loaders add Gosu types for objects from XML schemas (XSDs) and from remote WS-I compliant web services (SOAP). Later versions of the Gosu community release will include more APIs and documentation about creating your own custom type loaders.
Modules of code containing type loaders can create entire namespaces of new types. This means that a type loader can import external objects and let Gosu code manipulate them as native objects. There are two custom type loaders that included in Gosu: (1) Gosu XML typeloader. This type loader supports the native Gosu APIs for XML. For more information, see "Gosu and XML". (2) Gosu SOAP typeloader. This type loader supports the native Gosu APIs for SOAP.
The first Gosu community release does not yet include these add-on typeloaders that support these APIs due to in-progress changes in bundling add-on typeloaders. The Gosu documentation describes the XML and web services APIs right now so you can become familiar with these upcoming APIs.
For more information http://gosu-lang.org/doc/wwhelp/wwhimpl/api.htm?&context=gosu&src=intro&topic=Extensible_Type_System
Personally, I am tired of learning new languages. I use Java and C++ for when I need to hammer out some code, I use Jquery/javascript/CSS/HTML for webpage goodness. I use python for when I want to torture myself and constantly relearn how embedded the c-syntax is in my brain. Seriously... sometime you just want to use brac
WhiningAboutIndentationError: You knew what you were getting into. We have Django. Suck it.
Yet another language. Just what we need.
And who's fool decision was it to base it on top of the JVM.
You lost me at "Java"