ion.
But it's a really a terminology question. I only can't imagine explaining
it to students: ``remember, true is untyped,
but it can only be used as if it had type bool''.
On Wednesday, November 2, 2016 at 2:34:56 PM UTC+1, Ian Lance Taylor wrote:
>
> On W
l
> var n int
> var ok A
> n, ok = x.(int)
>
> Using bool here is not common, but you see this with int and float, etc.
> Untyped constants is one of the most prominent Go features.
>
> On Nov 2, 2016, at 4:09 AM, Martin Steffen > wrote:
>
> Hi, in the language spec, e.
Hi, in the language spec, e.g. in connection with ``type assertions'' and
``special forms'', like
v, ok = x.(T)
it's stated that it yield (in ok) an additional value which is both untyped
and boolean
(an ``untyped boolean value'').
How should one interpret that? If ok behaves like a boolean,