New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: Go2: standard libary without statements used with runtime #29868

Closed
tredoe opened this Issue Jan 22, 2019 · 2 comments

Comments

Projects
None yet
4 participants
@tredoe
Copy link

tredoe commented Jan 22, 2019

Whether the standard library were free of statements used with the Go's runtime, then it would be easier to be able to transpile the Go's standard library to other high-level languages like Java, Swift, C#, or until a low-level language like C.

That would include the usage of go, select, and defer statements, and channel types. And maybe the labels, since they are not used at every language.

Why

Go is a language with a little syntax and easily readable by whatever developer, so if there are libraries in Go that could be transpiled to other language, then we would save a lot of developer's hours by avoiding to have to build a library to solve the same problem at every different language. Besides, the great advantage over FFI is the free penalty at performance.

@gopherbot gopherbot added this to the Proposal milestone Jan 22, 2019

@gopherbot gopherbot added the Proposal label Jan 22, 2019

@bcmills

This comment has been minimized.

Copy link
Member

bcmills commented Jan 22, 2019

See previously #29147.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

ianlancetaylor commented Jan 22, 2019

If you think it would be useful to write libraries in Go that avoid go, select, and defer statements, then I would encourage you to write them. We are not going to impose that restriction on the Go standard library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment