Linked by kragil on Wed 23rd Jan 2013 20:26 UTC
Google "Native Client enables Chrome to run high-performance apps compiled from your C and C++ code. One of the main goals of Native Client is to be architecture-independent, so that all machines can run NaCl content. Today we're taking another step toward that goal: our Native Client SDK now supports ARM devices, from version 25 and onwards."
Permalink for comment 550241
To read all comments associated with this story, please click here.
RE[6]: Comment by Laurence
by satsujinka on Thu 24th Jan 2013 03:22 UTC in reply to "RE[5]: Comment by Laurence"
satsujinka
Member since:
2010-03-11

I'm not comparing it with JavaScript or C#. I was just showing that it's a 1-to-1 match with how you'd normally write a function that returns a function that computes successive Fibonacci numbers.

Though since you mention it, the JavaScript version looks identical as well.

function fib() {
var a = 0; var b = 1;
return function() {a = b; b = b + 1; return a;};
}


How's pointer or array syntax weird?

func f() []int {...}
func f() *int {...}

There's nothing weird about those signatures.
Array initialization is almost exactly like C:

[]int{1,2,3,4}

Reply Parent Score: 2