Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Q: setting to make int/uint an int64/uint64 #734
Understood, but for my use case, performance isn't that important. Rationale: I'm working on a REPL based on gopherjs and otto, so performance is much less important than correctness when stepping through code being tried at the REPL. I'd just like the REPL's values to match as closely as possible my typical 64-bit operating environment.
There isn't. It would be a non-trivial change (and, performance would be decreased as Richard said).
I would suggest using
If you have a REPL, perhaps you can make it execute the following code to create custom types:
// Override predeclared int and uint types to be int64 and uint64. type ( int int64 uint uint64 )
It's possible to do this because
Thanks Dmitri. Very cool. I didn't know that.
I played with having the
As an aside, if you want to follow along the repo is public at https://github.com/go-interpreter/gi and the todo list is https://github.com/go-interpreter/gi/issues . It's still probably a bit early to get anything real done, and the REPL barfs tons of debug prints after every command, but closures and slices and for loops work in a very elementary fashion. Still working on maps, and things like goroutines and channels are a long way off. You can see what is tested and working thus far by checking the tests in this file, https://github.com/go-interpreter/gi/blob/master/pkg/compiler/repl_test.go. There's quite a bit to do, but gopherjs is making it go quite quickly.