I think it’s time to start some Golo experiment.

Of course, everyone wanted the mandatory HelloWorld.
But hey, that’s a blog called “Little Experiment” ;)
(at least it was at the writing time in)

Ok, ok, the HelloWorld is available at Golo website, and as a present to my fellow readers, here is a copy here ;)

module hello.World

function main = |args| {
  println("Hello world!")

Save this to a helloworld.golo file.
To be sure, if your Golo environment is properly setup, all you have to do is: 12

> gologolo helloworld.golo
Hello world!

The interesting Golo things here are:

  • the Golo code is placed in a module (names separated with dots)
  • you can execute a Golo module if there’s a main function
  • you see how to define a function
  • gologolo is the tool that compile then execute your code. You can use goloc to compile and later golo to run it.

But you know what ?
If you have a ticket to Devoxx, don’t miss Julien’s talk there !