Skip to content

Commit d1a1923

Browse files
committed
doc/faq: explain the meaning of "runtime"
This truly is a common point of confusion that deserves explanation in the FAQ. Change-Id: Ie624e31a2042ca99626fe7570d9c8c075aae6a84 Reviewed-on: https://go-review.googlesource.com/28275 Reviewed-by: Ian Lance Taylor <iant@golang.org>
1 parent 6fb4b15 commit d1a1923

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

doc/go_faq.html

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,27 @@ <h3 id="Can_I_translate_the_Go_home_page">
271271

272272
<h2 id="Design">Design</h2>
273273

274+
<h3 id="runtime">
275+
Does Go have a runtime?</h3>
276+
277+
<p>
278+
Go does have an extensive library, called the <em>runtime</em>,
279+
that is part of every Go program.
280+
The runtime library implements garbage collection, concurrency,
281+
stack management, and other critical features of the Go language.
282+
Although it is more central to the language, Go's runtime is analogous
283+
to <code>libc</code>, the C library.
284+
</p>
285+
286+
<p>
287+
It is important to understand, however, that Go's runtime does not
288+
include a virtual machine, such as is provided by the Java runtime.
289+
Go programs are compiled ahead of time to native machine code.
290+
Thus, although the term is often used to describe the virtual
291+
environment in which a program runs, in Go the word &ldquo;runtime&rdquo;
292+
is just the name given to the library providing critical language services.
293+
</p>
294+
274295
<h3 id="unicode_identifiers">
275296
What's up with Unicode identifiers?</h3>
276297

@@ -881,7 +902,7 @@ <h3 id="covariant_types">
881902
func (v Value) Copy() Value
882903
</pre>
883904

884-
because <code>Value</code> implements the empty interface.
905+
<p>because <code>Value</code> implements the empty interface.
885906
In Go method types must match exactly, so <code>Value</code> does not
886907
implement <code>Copyable</code>.
887908
Go separates the notion of what a

0 commit comments

Comments
 (0)