Skip to content
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
Closed

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

tredoe opened this issue Jan 22, 2019 · 2 comments

Comments

@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
@bcmills
Copy link
Contributor

bcmills commented Jan 22, 2019

See previously #29147.

@ianlancetaylor
Copy link
Contributor

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.

@golang golang locked and limited conversation to collaborators Feb 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants