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

cmd/compile: use directive instead of command-line option for the compiling_runtime mode (aka '-+') #17942

Closed
typeless opened this issue Nov 16, 2016 · 1 comment

Comments

@typeless
Copy link

In summary, that will make the subset of Go which is capable of writing the runtime code available to users.

Purposes:

  1. Sometimes we want to write libraries in Go that would be linked by other languages. Most of the time a library equipped with its own runtime would be too heavyweight.

  2. Compiler-aided guarantee of zero-allocation code. That would make Go usable in certain extreme environments (like writing IRQ handlers!). Writing performance-critical tight loops can be benefited as well.

  3. Much economical binary size for tiny programs that don't require full-fledged GC and concurrency support (like those simple utilities whose jobs are mostly calling syscalls).

  4. Potentially we gophers can invade further into C's territory.

  5. Save C programmers from the living standard belonging to the last century.

@bradfitz
Copy link
Contributor

I don't think we want to support two languages (Go and pseudo-Go). The -+ flag is a necessary evil and internal detail, not something we want to encourage.

I'm going to close this, but @ianlancetaylor and @rsc can reopen it if they disagree.

@golang golang locked and limited conversation to collaborators Nov 17, 2017
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

3 participants