Re: [go-nuts] Mismatched types work sometimes?

2019-02-11 Thread Jamie Caldwell
Cheers Rob, I'll certainly read that. On Mon, 11 Feb 2019 at 20:53, Rob Pike wrote: > You might find blog.golang.org/constants helpful. > > -rob > > > On Tue, Feb 12, 2019 at 5:04 AM Jamie Caldwell < > mr.jamie.caldw...@gmail.com> wrote: > >> Thanks f

Re: [go-nuts] Mismatched types work sometimes?

2019-02-11 Thread Jamie Caldwell
e > language spec on this: https://golang.org/ref/spec#Constants > > On Mon, Feb 11, 2019 at 9:37 AM Jamie Caldwell < > mr.jamie.caldw...@gmail.com> wrote: > >> Hello, >> >> Can you help? >> >> https://play.golang.org/p/XfJZ3h06p60 >> >>

[go-nuts] Mismatched types work sometimes?

2019-02-11 Thread Jamie Caldwell
Hello, Can you help? https://play.golang.org/p/XfJZ3h06p60 Why does 'A' work, when first assigning it to a variable doesn't? Thank you, Jamie. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] Re: When would you use single quotes?

2019-02-08 Thread Jamie Caldwell
g (one to four byte) literal. > > Peter > > On Wednesday, February 6, 2019 at 6:14:41 PM UTC-5, Jamie Caldwell wrote: >> >> Hello, >> >> I'd be grateful if someone could please explain why you would use >> >> r := '⌘' >> >> Instead of &g

Re: [go-nuts] When would you use single quotes?

2019-02-07 Thread Jamie Caldwell
Thank you both for your answers. It is much appreciated. The UTF8 encoding of that codepoint is three bytes. So the rune will still occupy 4 bytes, even if the last byte holds no data? I'm sorry for the school boy question! Thank you. On Thu, 7 Feb 2019, 10:52 Tamás Gulácsi A rune is an

Re: [go-nuts] When would you use single quotes?

2019-02-07 Thread Jamie Caldwell
Thank you for getting back to me, but I don't think you have answered my question. I understand they are a rune and string respectively. But *why* would you use one over the other? Why does Go support being able to assign a codepoint using single quotes? Also, why do they take more than three

[go-nuts] When would you use single quotes?

2019-02-06 Thread mr . jamie . caldwell
Hello, I'd be grateful if someone could please explain why you would use r := '⌘' Instead of s := "⌘" / s:= `⌘` All use three bytes ...? Thank you, Jamie. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and