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 550149
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[4]: Comment by Laurence
by Nelson on Wed 23rd Jan 2013 21:01 UTC 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[5]: Comment by Laurence
by dagw on Wed 23rd Jan 2013 21:44 in reply to "RE[4]: Comment by Laurence"
dagw Member since:
2005-07-06

I'm scared to even think what this would look like in C++.

int f(int (*fnc)(int,int),int,int)

Reply Parent Score: 2

RE[5]: Comment by Laurence
by lucas_maximus on Wed 23rd Jan 2013 22:56 in reply to "RE[4]: Comment by Laurence"
lucas_maximus Member since:
2009-08-18

var f = Func<Func<int, int, int>, int, int>


Would probably want to be

var f = Func<Func<myObjectWith3ints>, int, int>

If I am understanding Func correctly.

Reply Parent Score: 2

RE[6]: Comment by Laurence
by Nelson on Wed 23rd Jan 2013 23:08 in reply to "RE[5]: Comment by Laurence"
Nelson Member since:
2005-11-29

Func can support up to 16 variables and a return type.

Reply Parent Score: 2

RE[5]: Comment by Laurence
by Loreia on Thu 24th Jan 2013 09:35 in reply to "RE[4]: Comment by Laurence"
Loreia Member since:
2012-01-17

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


Sounds like you have an issue with C++.
C++ would require just one extra * char for function pointer. Hardly anything to be scared of.

Reply Parent Score: 2

RE[6]: Comment by Laurence
by Nelson on Fri 25th Jan 2013 02:25 in reply to "RE[5]: Comment by Laurence"
Nelson Member since:
2005-11-29

Assuming you ignore C++isms and use function pointers, then sure.

Reply Parent Score: 2