Thank you, Ian.
在 2018年8月15日星期三 UTC+8下午12:36:31,Ian Lance Taylor写道:
>
> On Tue, Aug 14, 2018 at 7:37 PM, > wrote:
> >
> > Why not define the methods on type "string" ?
> > I look up the document, strings package handles string with UTF-8
> encoding.
> > is it the reason ?
> > if not, it's
On Thu, Aug 16, 2018 at 6:53 AM Kevin Malachowski
wrote:
> Well, the 'error' type has a method. But none of the other primitives do.
The predeclared 'error' type is an interface. Interfaces do not have
methods. Interfaces only declare method sets.
--
-j
--
You received this message because y
Well, the 'error' type has a method. But none of the other primitives do.
--
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
On Tue, Aug 14, 2018 at 7:37 PM, wrote:
>
> Why not define the methods on type "string" ?
> I look up the document, strings package handles string with UTF-8 encoding.
> is it the reason ?
> if not, it's design decision or any other reasons ?
1. None of the types defined by the language have met
Why not define the methods on type "string" ?
I look up the document, strings package handles string with UTF-8 encoding.
is it the reason ?
if not, it's design decision or any other reasons ?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To