You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we go run foo.go "not_an_int", the program prints 0 and exists successfully. When we python3 foo.py "not_an_int", we see:
Traceback (most recent call last):
File "foo.py", line 3, in <module>
print(int(sys.argv[1]))
ValueError: invalid literal for int() with base 10: 'not_an_int'
The text was updated successfully, but these errors were encountered:
That's right, a middleware that implements Go-style error checks was in the works, however currently that's not implemented.
As a whole this projects is currently on hold: I am currently focused on my job and different projects. I'll probably finish a more stable new version if there is any interest in it. (The people interested in this project had vastly different usecases/wishes for its functionality so I decided to wait for a compelling usecase)
Fair enough. I'm certainly interested in this project. I'm contributing to Grumpy (a Python runtime in Go) which aims to support most of Python2.7 in all its dynamic glory, but it does so by compiling everything into a Go *Object struct. Ideally, I would like a hybrid approach, which compiles to idiomatic Go whenever provably possible, falling back to dynamic *Objects when not. This is well outside the scope of this project and probably not feasible, but I'm sure I can learn a lot toward that end by following this project.
That's a very nice idea, but you're right, it's outside the scope of this project. Grumpy is pretty interesting, I wonder if somebody is building a Ruby runtime on Go too.
Uh oh!
There was an error while loading. Please reload this page.
Compiling the following program to Go produces no error handling logic:
When we
go run foo.go "not_an_int"
, the program prints0
and exists successfully. When wepython3 foo.py "not_an_int"
, we see:The text was updated successfully, but these errors were encountered: