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."
Thread beginning with comment 550142
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Comment by Laurence
by Laurence on Wed 23rd Jan 2013 20:48 UTC in reply to "RE: Comment by Laurence"
Laurence
Member since:
2007-03-26


Go is a C like language, a little more pretty but still with a syntax that can become hard to read IMHO.

Sorry, but I'm not sure I get your point as both the officially supported languages are C-like (Java and C++).

However Go is much more than just another C-like language. Syntactically it's concise yet still verbose enough to be readable. It's a managed language but it doesn't make assumptions (unlike some managed languages).

In all honestly, I've only been using it a week yet it's so easy to pick up that I already feel like I've been programming in the language for months. It really is a joy to use.

Plus it's cross compiling support is child's play. I can write an application on x86, get it working exactly how I want, then just change one compiler flag to create and ARM binary for my Raspberry Pi. I will concede that it's been the best part of 10 years since I've done any cross compiling in C++, but I'm sure it was never that easy.

Edited 2013-01-23 20:50 UTC

Reply Parent Score: 2

RE[3]: Comment by Laurence
by Hiev on Wed 23rd Jan 2013 20:51 in reply to "RE[2]: Comment by Laurence"
Hiev Member since:
2005-09-27

Personally, I find the sintax cryptic and I would only use it as a last resource.

For example:

func fib() func() int {
a, b := 0, 1
return func() int {
a, b = b, a+b
return a
}
}

Some people may feel comfortable with that kind of syntax, I don't, It is as bad as the worse C++ IMHO, well not that bad.

Edited 2013-01-23 20:58 UTC

Reply Parent Score: 4

RE[4]: Comment by Laurence
by Laurence on Wed 23rd Jan 2013 21:00 in reply to "RE[3]: Comment by Laurence"
Laurence Member since:
2007-03-26

To be honest, that doesn't even look valid Go (though, as I said, I'm only a week in on the language).

However some of the weirder syntax I've read on the tutorials were purely demonstrations showing how the more advanced C++ routines would be ported (so not really your typical day to day functions).

But lets be honest, you can find extreme cases of bad code in any language, so if you're genuinely curious about the language then I'd recommend have a quick browse through the tour: http://tour.golang.org/

Reply Parent Score: 2

RE[4]: Comment by Laurence
by Nelson on Wed 23rd Jan 2013 21:01 in reply to "RE[3]: Comment by Laurence"
Nelson Member since:
2005-11-29

It takes time to adjust, but Go's declaration syntax is novel and helpful, especially when dealing with complex types.

Go:
f func(func(int,int) int, int) int

C#:
var f = Func<Func<int, int, int>, int, int>

There is just no sane way to write the syntax generally. I'm scared to even think what this would look like in C++.

Reply Parent Score: 2

RE[4]: Comment by Laurence
by satsujinka on Wed 23rd Jan 2013 22:19 in reply to "RE[3]: Comment by Laurence"
satsujinka Member since:
2010-03-11

You've been space butchered, but it's not that weird.

The anonymous function is simply a closure that captures the variables a and b, then modifies them both to produce the next Fibonacci number when called.

It's really quite standard. I mean compare to a similar Scheme function (mind you it's been awhile):

(define fib (let ((a 0) (b1))
(lambda () (begin (set! a b) (set! b (+ b 1)) a)))

But of course, until you share what language you think does this "better," it's impossible to address your complaint.

Edited 2013-01-23 22:19 UTC

Reply Parent Score: 3

RE[4]: Comment by Laurence
by saso on Wed 23rd Jan 2013 23:18 in reply to "RE[3]: Comment by Laurence"
saso Member since:
2007-04-18

Congrats, you've written shit code with no sense of style and taste. Hope you feel good that even automatic code formatting tools like "indent" are smarter than you. Writing unreadable code to make a statement about style is about as valid as criticizing car safety by driving down a mountain road at 200+mph, IOW nobody will take you seriously.

Reply Parent Score: 4

RE[3]: Comment by Laurence
by vivainio on Wed 23rd Jan 2013 21:47 in reply to "RE[2]: Comment by Laurence"
vivainio Member since:
2008-12-26

It's a managed language but it doesn't make assumptions (unlike some managed languages).


Go is not managed language, even if it's garbage collected. It compiles directly to native code that is executed on the CPU (i.e. no interim "bytecode" representation is used).

Reply Parent Score: 4

RE[4]: Comment by Laurence
by Hiev on Wed 23rd Jan 2013 21:52 in reply to "RE[3]: Comment by Laurence"
Hiev Member since:
2005-09-27

True, and the consequence of being garbage collected is that it makes the size of the executable bigger, a minor issue compared with the benefits of a GC.

Reply Parent Score: 2

RE[4]: Comment by Laurence
by Laurence on Wed 23rd Jan 2013 22:24 in reply to "RE[3]: Comment by Laurence"
Laurence Member since:
2007-03-26

Sorry yes. You're absolutely right.

Reply Parent Score: 2