Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(252)

Side by Side Diff: doc/go_spec.html

Issue 5369090: code review 5369090: spec: disallow general func, map comparisons (Closed)
Patch Set: diff -r 401c905a115f https://go.googlecode.com/hg/ Created 13 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- title The Go Programming Language Specification --> 1 <!-- title The Go Programming Language Specification -->
2 <!-- subtitle Version of November 9, 2011 --> 2 <!-- subtitle Version of November 13, 2011 -->
3 3
4 <!-- 4 <!--
5 TODO 5 TODO
6 [ ] need language about function/method calls and parameter passing rules 6 [ ] need language about function/method calls and parameter passing rules
7 [ ] last paragraph of #Assignments (constant promotion) should be elsewhere 7 [ ] last paragraph of #Assignments (constant promotion) should be elsewhere
8 and mention assignment to empty interface. 8 and mention assignment to empty interface.
9 [ ] need to say something about "scope" of selectors? 9 [ ] need to say something about "scope" of selectors?
10 [ ] clarify what a field name is in struct declarations 10 [ ] clarify what a field name is in struct declarations
11 (struct{T} vs struct {T T} vs struct {t T}) 11 (struct{T} vs struct {T T} vs struct {t T})
12 [ ] need explicit language about the result type of operations 12 [ ] need explicit language about the result type of operations
(...skipping 2946 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 </li> 2959 </li>
2960 <li> 2960 <li>
2961 Boolean values are equal if they are either both 2961 Boolean values are equal if they are either both
2962 <code>true</code> or both <code>false</code>. 2962 <code>true</code> or both <code>false</code>.
2963 </li> 2963 </li>
2964 <li> 2964 <li>
2965 Pointer values are equal if they point to the same location 2965 Pointer values are equal if they point to the same location
2966 or if both are <code>nil</code>. 2966 or if both are <code>nil</code>.
2967 </li> 2967 </li>
2968 <li> 2968 <li>
2969 » Function values are equal if they refer to the same function 2969 » A slice, map, or function value may be compared only to <code>nil</code> .
2970 » or if both are <code>nil</code>.
2971 </li> 2970 </li>
2972 <li> 2971 <li>
2973 » A slice value may only be compared to <code>nil</code>. 2972 » Channel values are equal if they were created by the same call to <code> make</code>
2974 » </li>
2975 » <li>
2976 » Channel and map values are equal if they were created by the same call t o <code>make</code>
2977 (§<a href="#Making_slices_maps_and_channels">Making slices, maps, and ch annels</a>) 2973 (§<a href="#Making_slices_maps_and_channels">Making slices, maps, and ch annels</a>)
2978 or if both are <code>nil</code>. 2974 or if both are <code>nil</code>.
2979 </li> 2975 </li>
2980 <li> 2976 <li>
2981 Interface values are equal if they have <a href="#Type_identity">identic al</a> dynamic types and 2977 Interface values are equal if they have <a href="#Type_identity">identic al</a> dynamic types and
2982 equal dynamic values or if both are <code>nil</code>. 2978 equal dynamic values or if both are <code>nil</code>.
2983 </li> 2979 </li>
2984 <li> 2980 <li>
2985 An interface value <code>x</code> is equal to a non-interface value 2981 An interface value <code>x</code> is equal to a non-interface value
2986 <code>y</code> if the dynamic type of <code>x</code> is identical to 2982 <code>y</code> if the dynamic type of <code>x</code> is identical to
(...skipping 2340 matching lines...) Expand 10 before | Expand all | Expand 10 after
5327 <code>unsafe.Alignof(x[0])</code>, but at least 1. 5323 <code>unsafe.Alignof(x[0])</code>, but at least 1.
5328 </li> 5324 </li>
5329 </ol> 5325 </ol>
5330 5326
5331 <span class="alert"> 5327 <span class="alert">
5332 <h2 id="Implementation_differences">Implementation differences - TODO</h2> 5328 <h2 id="Implementation_differences">Implementation differences - TODO</h2>
5333 <ul> 5329 <ul>
5334 <li><code>len(a)</code> is only a constant if <code>a</code> is a (quali fied) identifier denoting an array or pointer to an array.</li> 5330 <li><code>len(a)</code> is only a constant if <code>a</code> is a (quali fied) identifier denoting an array or pointer to an array.</li>
5335 </ul> 5331 </ul>
5336 </span> 5332 </span>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b