Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for Effect (0.03 seconds)

  1. doc/go_spec.html

    type is not the same as an initialized but empty value of the same type.
    Consequently, taking the address of an empty slice or map composite literal
    does not have the same effect as allocating a new slice or map value with
    <a href="#Allocation">new</a>.
    </p>
    
    <pre>
    p1 := &amp;[]int{}    // p1 points to an initialized, empty slice with value []int{} and length 0
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Tue Dec 02 23:07:19 GMT 2025
    - 286.5K bytes
    - Click Count (1)
Back to Top