https://golang.org/ref/spec#Comparison_operators
> Pointers to distinct zero-size variables may or may not be equal.
Looks like a more complicated example
of https://github.com/golang/go/issues/8938.
On Friday, January 6, 2017 at 2:24:39 AM UTC-8, Ignazio Di Napoli wrote:
>
> I'm very curious
Using inherent print function, you can see this more
clearly: https://play.golang.org/p/WKk7n9U2zt
--
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
Thank you!
>
>
--
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
The language spec seems to allow a1 and a2 to have the same address but
doesn't require that to be always the case.
At the one hand:
*Taking the address of a composite literal generates a pointer to a unique
variable initialized with the literal's value. *[Composite Literals]
On the other
So, with Println the compiler can optimize and assign the same address to
a1 and a2, and without it cannot? Why?
--
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
Ok, but why does the Println changes the result?
--
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,
rom: <golang-nuts@googlegroups.com> on behalf of Marvin Stenger
<marvin.stenge...@gmail.com>
Date: Sunday, November 13, 2016 at 12:05 PM
To: golang-nuts <golang-nuts@googlegroups.com>
Cc: <vvv.poc...@gmail.com>
Subject: [go-nuts] Re: Is it a compiler bug?
What should b
What should be wrong? It is as intuitive as it can be. Did you ever wrote a
lexer/tokenizer?
Am Sonntag, 13. November 2016 08:38:03 UTC+1 schrieb imd3c:
>
> OK, I get it. It's in the spec, I had to check it. But still, isn't it
> wrong? What's the point, is it tradition or something? I checked
OK, I get it. It's in the spec, I had to check it. But still, isn't it
wrong? What's the point, is it tradition or something? I checked C, Java,
Rust, they all do the same.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from