]> Cypherpunks repositories - gostls13.git/commitdiff
doc/faq: explain the meaning of "runtime"
authorRob Pike <r@golang.org>
Sat, 27 Aug 2016 02:09:38 +0000 (12:09 +1000)
committerRob Pike <r@golang.org>
Wed, 31 Aug 2016 22:38:31 +0000 (22:38 +0000)
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>
doc/go_faq.html

index de334ef19723bc8cefd5588c5c46b3b57971f5d8..921c0b8a7c6df6adcf75851bcd29eda158b89f3c 100644 (file)
@@ -271,6 +271,27 @@ you will need to abide by the guidelines at
 
 <h2 id="Design">Design</h2>
 
+<h3 id="runtime">
+Does Go have a runtime?</h3>
+
+<p>
+Go does have an extensive library, called the <em>runtime</em>,
+that is part of every Go program.
+The runtime library implements garbage collection, concurrency,
+stack management, and other critical features of the Go language.
+Although it is more central to the language, Go's runtime is analogous
+to <code>libc</code>, the C library.
+</p>
+
+<p>
+It is important to understand, however, that Go's runtime does not
+include a virtual machine, such as is provided by the Java runtime.
+Go programs are compiled ahead of time to native machine code.
+Thus, although the term is often used to describe the virtual
+environment in which a program runs, in Go the word &ldquo;runtime&rdquo;
+is just the name given to the library providing critical language services.
+</p>
+
 <h3 id="unicode_identifiers">
 What's up with Unicode identifiers?</h3>
 
@@ -881,7 +902,7 @@ would be satisfied by the method
 func (v Value) Copy() Value
 </pre>
 
-because <code>Value</code> implements the empty interface.
+<p>because <code>Value</code> implements the empty interface.
 In Go method types must match exactly, so <code>Value</code> does not
 implement <code>Copyable</code>.
 Go separates the notion of what a