I agree that a spoonful of syntactic sugar would be wonderful here, though 
I don't have any strong opinions on what form it should take.

On Saturday, October 22, 2016 at 12:31:58 PM UTC-6, Pietro Gagliardi 
(andlabs) wrote:
>
>
> On Oct 22, 2016, at 2:19 PM, Matt Harden <matt....@gmail.com <javascript:>> 
> wrote:
>
> and [...]int{5}[:] is also illegal (slice of unaddressable value)
>
>
> []int{5} will do the same thing, and I didn't know this until recently but 
> the spec is written such that this even works with named indices:
>
> v := []int{
> 5: 5,
> }
> fmt.Println(len(v)) // prints 6
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to