mirror of
https://github.com/golang/go
synced 2024-11-13 15:00:23 -07:00
parent
72a59cecb9
commit
e434f1a763
@ -14,7 +14,7 @@ the computing landscape has changed tremendously. There are several trends:
|
|||||||
Computers are enormously quicker but software development is not faster.
|
Computers are enormously quicker but software development is not faster.
|
||||||
<li>
|
<li>
|
||||||
Dependency management is a big part of software development today but the
|
Dependency management is a big part of software development today but the
|
||||||
"header files" of languages in the C tradition are antithetical to clean
|
“header files” of languages in the C tradition are antithetical to clean
|
||||||
dependency analysis—and fast compilation.
|
dependency analysis—and fast compilation.
|
||||||
<li>
|
<li>
|
||||||
There is a growing rebellion against cumbersome type systems like those of
|
There is a growing rebellion against cumbersome type systems like those of
|
||||||
@ -54,7 +54,7 @@ software on multicore machines.
|
|||||||
What is the origin of the name?</h3>
|
What is the origin of the name?</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
"Ogle" would be a good name for a Go debugger.
|
“Ogle” would be a good name for a Go debugger.
|
||||||
|
|
||||||
<h3 id="What_kind_of_a_name_is_6g">
|
<h3 id="What_kind_of_a_name_is_6g">
|
||||||
What kind of a name is 6g?</h3>
|
What kind of a name is 6g?</h3>
|
||||||
@ -62,7 +62,7 @@ What kind of a name is 6g?</h3>
|
|||||||
<p>
|
<p>
|
||||||
The <code>6g</code> (and <code>8g</code> and <code>5g</code>) compiler is named in the
|
The <code>6g</code> (and <code>8g</code> and <code>5g</code>) compiler is named in the
|
||||||
tradition of the Plan 9 C compilers, described in
|
tradition of the Plan 9 C compilers, described in
|
||||||
<a href="http://plan9.bell-labs.com/sys/doc/compiler.html ">
|
<a href="http://plan9.bell-labs.com/sys/doc/compiler.html">
|
||||||
http://plan9.bell-labs.com/sys/doc/compiler.html</a>
|
http://plan9.bell-labs.com/sys/doc/compiler.html</a>
|
||||||
(see the table in section 2).
|
(see the table in section 2).
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ Who should use the language?</h3>
|
|||||||
<p>
|
<p>
|
||||||
Go is an experiment. We hope adventurous users will give it a try and see
|
Go is an experiment. We hope adventurous users will give it a try and see
|
||||||
if they enjoy it. Not every programmer
|
if they enjoy it. Not every programmer
|
||||||
will but we hope enough will find satisfaction in the approach it
|
will, but we hope enough will find satisfaction in the approach it
|
||||||
offers to justify further development.
|
offers to justify further development.
|
||||||
|
|
||||||
<h3 id="Do_Go_programs_link_with_Cpp_programs">
|
<h3 id="Do_Go_programs_link_with_Cpp_programs">
|
||||||
@ -103,7 +103,7 @@ C or C++ programs. However, because Go is garbage-collected it will be
|
|||||||
unwise to do so, at least naively.
|
unwise to do so, at least naively.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
There is a 'foreign function interface' to allow safe calling of C-written
|
There is a “foreign function interface” to allow safe calling of C-written
|
||||||
libraries from Go code. We expect to use SWIG to extend this capability
|
libraries from Go code. We expect to use SWIG to extend this capability
|
||||||
to C++ libraries. There is no safe way to call Go code from C or C++ yet.
|
to C++ libraries. There is no safe way to call Go code from C or C++ yet.
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ Is Go an object-oriented language?</h3>
|
|||||||
<p>
|
<p>
|
||||||
Yes and no. Although Go has types and methods and allows an
|
Yes and no. Although Go has types and methods and allows an
|
||||||
object-oriented style of programming, there is no type hierarchy.
|
object-oriented style of programming, there is no type hierarchy.
|
||||||
The concept of "interface" in Go provides a different approach that
|
The concept of “interface” in Go provides a different approach that
|
||||||
we believe is easy to use and in some ways more general. There are
|
we believe is easy to use and in some ways more general. There are
|
||||||
also ways to embed types in other types to provide something
|
also ways to embed types in other types to provide something
|
||||||
analogous—but not identical—to subclassing.
|
analogous—but not identical—to subclassing.
|
||||||
@ -159,7 +159,7 @@ they can be defined for any sort of data, not just structs.
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
Also, the lack of type hierarchy makes “objects” in Go feel much more
|
Also, the lack of type hierarchy makes “objects” in Go feel much more
|
||||||
lightweight than in languages such as C++ and Java.
|
lightweight than in languages such as C++ or Java.
|
||||||
|
|
||||||
<h3 id="How_do_I_get_dynamic_dispatch_of_methods">
|
<h3 id="How_do_I_get_dynamic_dispatch_of_methods">
|
||||||
How do I get dynamic dispatch of methods?</h3>
|
How do I get dynamic dispatch of methods?</h3>
|
||||||
@ -199,7 +199,7 @@ There is a program, <code>godoc</code>, written in Go, that extracts
|
|||||||
package documentation from the source code. It can be used on the
|
package documentation from the source code. It can be used on the
|
||||||
command line or on the web. An instance is running at
|
command line or on the web. An instance is running at
|
||||||
<a href="http://golang.org/pkg/">http://golang.org/pkg/</a>.
|
<a href="http://golang.org/pkg/">http://golang.org/pkg/</a>.
|
||||||
In fact, <code>godoc</code> implements the full site at
|
In fact, <code>godoc</code> implements the full site at
|
||||||
<a href="http://golang.org/">http://golang.org/</a>.
|
<a href="http://golang.org/">http://golang.org/</a>.
|
||||||
|
|
||||||
<h3 id="Is_there_a_Go_programming_style_guide">
|
<h3 id="Is_there_a_Go_programming_style_guide">
|
||||||
@ -326,10 +326,10 @@ How is the runtime implemented?</h3>
|
|||||||
<p>
|
<p>
|
||||||
Again due to bootstrapping issues, the runtime is mostly in C (with a
|
Again due to bootstrapping issues, the runtime is mostly in C (with a
|
||||||
tiny bit of assembler) although Go is capable of implementing most of
|
tiny bit of assembler) although Go is capable of implementing most of
|
||||||
it now. <code>Gccgo</code>'s runtime uses <code>glibc</code>;
|
it now. <code>Gccgo</code>'s runtime uses <code>glibc</code>.
|
||||||
<code>Gc</code> uses a custom library, to keep the footprint under
|
<code>Gc</code> uses a custom library, to keep the footprint under
|
||||||
control; it is
|
control; it is
|
||||||
compiled with a version of the Plan 9 C compiler that supports
|
compiled with a version of the Plan 9 C compiler that supports
|
||||||
segmented stacks for goroutines.
|
segmented stacks for goroutines.
|
||||||
work is underway to provide the same stack management in
|
Work is underway to provide the same stack management in
|
||||||
<code>gccgo</code>.
|
<code>gccgo</code>.
|
||||||
|
Loading…
Reference in New Issue
Block a user