Jump to content

Null object: Difference between revisions

→‎{{header|Go}}: reference Undefined values task
(→‎{{header|Go}}: added comments)
(→‎{{header|Go}}: reference Undefined values task)
Line 197:
In practice, all notable hosted implementations follow the C practice of being able to treat a zero address (i.e. FALSE) as a null address for the purpose of list termination.
=={{header|Go}}==
Nil is a predefined identifier, defined for six types in Go. In each case, it represents the zero value for the type, that is, the memory representation of all zero bytes. This is the value of a newly created object. In the cases of these six types, an object must be subsequently initialized in some way before it has much use. Examples of initialization are given in the [http://rosettacode.org/wiki/Undefined_values#Go Go solution] of task [http://rosettacode.org/wiki/Undefined_values Undefined values].
Nil is defined for six types in go.
<lang go>
package main
1,707

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.