[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] man oh man Java is painful



On Nov 6, 2011, at 2:15 AM, Greg Ewing wrote:
>> Absolutely not sure it fits the bill... but have you had a look at go?
>> http://golang.org/
> I looked at it. My first impression was "this is ugly". I'm pretty
> sure it's not the language I was talking about.

No, that is indeed the google Go thing.

Which they support on the app engine to have something faster than py, but nicer than c. But is somewhat close to c I guess. 

The fibonacci example is:

package main

// fib returns a function that returns
// successive Fibonacci numbers.
func fib() func() int {
	a, b := 0, 1
	return func() int {
		a, b = b, a+b
		return b
	}
}

func main() {
	f := fib()
	// Function calls are evaluated left-to-right.
	println(f(), f(), f(), f(), f())
}

> Greg


~Toni