1
0
mirror of https://github.com/golang/go synced 2024-11-21 17:14:45 -07:00
go/doc
Russ Cox 8e38b17a90 spec: apply method sets, embedding to all types, not just named types
When we first wrote the method set definition, we had long
discussions about whether method sets applied to all types
or just named types, and we (or at least I) concluded that it
didn't matter: the two were equivalent points of view, because
the only way to introduce a new method was to write a method
function, which requires a named receiver type.

However, the addition of embedded types changed this.
Embedding can introduce a method without writing an explicit
method function, as in:

        var x struct {
                sync.Mutex
        }

        var px *struct {
                sync.Mutex
        }

        var _, _ sync.Locker = &x, px

The edits in this CL make clear that both &x and px satisfy
sync.Locker.  Today, gccgo already works this way; 6g does not.

R=golang-dev, gri, iant, r
CC=golang-dev
https://golang.org/cl/5702062
2012-02-29 15:54:06 -05:00
..
articles doc: move wiki tutorial into articles directory, rmdir doc/codelab 2012-02-27 11:25:43 +11:00
codewalk doc: fix codewalk/markov.go 2012-02-15 13:07:34 +11:00
devel weekly.2012-02-22 2012-02-23 16:40:13 +11:00
gopher godoc: new design 2012-02-13 21:22:36 +11:00
play doc: support redirect-on-share 2012-02-22 09:16:54 +11:00
progs tutorial: delete 2012-02-28 13:35:58 +11:00
talks tutorial: delete 2012-02-28 13:35:58 +11:00
button_background.png golang.org redesign 2010-09-16 14:01:02 +10:00
code.html doc: various updates to doc/code.html 2012-02-18 16:13:02 +11:00
codereview_with_mq.html godoc: specify HTML page metadata with a JSON blob 2012-01-19 11:24:54 +11:00
contrib.html doc: update contrib.html 2012-02-20 08:33:28 +11:00
contribute.html godoc: specify HTML page metadata with a JSON blob 2012-01-19 11:24:54 +11:00
debugging_with_gdb.html godoc: specify HTML page metadata with a JSON blob 2012-01-19 11:24:54 +11:00
docs.html doc: remove Go for C++ Programmers 2012-02-29 13:23:07 +11:00
effective_go.html tutorial: delete 2012-02-28 13:35:58 +11:00
effective_go.tmpl tutorial: delete 2012-02-28 13:35:58 +11:00
ExpressivenessOfGo.pdf fix bug in example. need to convert Value to float in Abs example 2010-10-18 16:05:50 -07:00
gccgo_contribute.html doc: update gccgo_contribute.html 2012-02-18 11:15:52 -08:00
gccgo_install.html doc: update install.html for binary distros, add install-source.html 2012-02-14 17:02:28 +11:00
go1.html doc/go1: tweaks to address rsc's comments 2012-02-29 11:29:33 +11:00
go1.tmpl doc/go1: tweaks to address rsc's comments 2012-02-29 11:29:33 +11:00
go1compat.html doc: new document about compatibility of releases 2012-02-09 09:42:40 +11:00
go_faq.html FAQ: many small fixes and adjustments 2012-02-20 12:42:50 +11:00
go_mem.html godoc: specify HTML page metadata with a JSON blob 2012-01-19 11:24:54 +11:00
go_spec.html spec: apply method sets, embedding to all types, not just named types 2012-02-29 15:54:06 -05:00
go-logo-black.png godoc: style update. 2009-11-05 12:18:54 -08:00
go-logo-blue.png Update the styling of the godoc pages. 2009-11-03 19:59:45 -08:00
go-logo-white.png create doc/talks/. 2010-01-13 16:26:22 -08:00
godocs.js godoc: list examples in index 2012-02-14 14:52:00 +11:00
ie.css golang.org redesign 2010-09-16 14:01:02 +10:00
install-source.html tutorial: delete 2012-02-28 13:35:58 +11:00
install.html doc: instruct freebsd/linux users to rm the old version first 2012-02-27 14:16:56 +11:00
logo-153x55.png new logo 2009-10-12 22:58:32 -07:00
logo.png golang.org redesign 2010-09-16 14:01:02 +10:00
Makefile tutorial: delete 2012-02-28 13:35:58 +11:00
makehtml tutorial: delete 2012-02-28 13:35:58 +11:00
play_overlay.png golang.org redesign 2010-09-16 14:01:02 +10:00
playground.html godoc: specify HTML page metadata with a JSON blob 2012-01-19 11:24:54 +11:00
popups.js godoc: initial support for showing popup information 2010-03-16 14:17:42 -07:00
reference.html doc: add App Engine docs to 'learn' and 'reference' pages 2012-02-15 12:58:40 +11:00
root.html godoc: fix playground url 2012-02-22 10:09:34 +11:00
sieve.gif repair corrupted sieve.gif 2009-10-30 10:34:01 -07:00
style.css doc/style.css: make selectors more selective. 2012-02-29 09:38:58 +11:00
tmpltohtml.go doc: only trim newlines in tmpltohtml, gofmt progs 2012-01-09 20:05:34 +11:00
video-001.png golang.org redesign 2010-09-16 14:01:02 +10:00
video-002.png golang.org redesign 2010-09-16 14:01:02 +10:00
video-003.png golang.org redesign 2010-09-16 14:01:02 +10:00
video-004.png doc: add Practical Go Programming to front page and docs.html 2010-12-03 06:57:30 +09:00
video-005.jpg doc: add I/O 2011 talks to talks/, docs.html, and front page. 2011-05-17 13:46:54 +10:00