|
|
|
|
|
by uh_uh
1892 days ago
|
|
Why can't &3 work? Rob says 3 does not have a type and that's a problem. Would it be possible to change the Go compiler such that 3 has a type? (I'm guessing no, at least not easily, otherwise he'd be suggesting it, but I'm curious about the reason) |
|
Why not? In fact it already kind-of does: Go has "default types" for most untyped constants. When you write
absent an explicit type, Go will fall back to "int".