Re:GopherJS
by giaour on Sunday March 29, 2015 @07:09PM
(#9286846)
I used this once to port some math-heavy Go and both amazed and aghast when I saw how int64 values were handled in the resulting javascript.
[ Parent
| on HN ]
Its primary goal is to follow the Go spec correctly, including simulating overflow/underflow on int64 type. Implementing that in JavaScript will have overhead.
So if you don't care about that, you can use int type instead, it will be faster.
But if you do care, I agree, using Go types is much much more pleasant and GopherJS takes care of that for you!
I needed int64s and expected the js not to work in all cases. I was amazed at the ingenuity of the gopherjs team and aghast at the state of integer math in javascript.
Re:GopherJS
by loosescrews on Monday March 30, 2015 @04:56AM
(#9288378)
Can you post an example? The playground doesn't seem to be working right now.