What is the "official" name of :=

1,106 views
Skip to first unread message

Sam Fourman Jr.

unread,
Aug 5, 2014, 11:02:25 PM8/5/14
to golan...@googlegroups.com
Hello,

I am new to go, and while reading through the following doc.


I am wondering how to use := in a sentence, when speaking with another go programmer?

Thanks in advance
--

Sam Fourman Jr.

Dan Kortschak

unread,
Aug 5, 2014, 11:05:44 PM8/5/14
to Sam Fourman Jr., golan...@googlegroups.com
On Tue, 2014-08-05 at 22:02 -0500, Sam Fourman Jr. wrote:
> I am wondering how to use := in a sentence, when speaking with another
> go programmer?

Although I don't use it, I like "gopher operator" (tilt head).

andrey mirtchovski

unread,
Aug 5, 2014, 11:09:37 PM8/5/14
to Dan Kortschak, Sam Fourman Jr., golan...@googlegroups.com
a := b ⇒ "a gophers b"

Brad Fitzpatrick

unread,
Aug 5, 2014, 11:14:55 PM8/5/14
to andrey mirtchovski, Dan Kortschak, Sam Fourman Jr., golan...@googlegroups.com
"bucktooth" is the same number of syllables. "a bucktooth b"




On Tue, Aug 5, 2014 at 8:09 PM, andrey mirtchovski <mirtc...@gmail.com> wrote:
a := b ⇒ "a gophers b"

--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Gerrand

unread,
Aug 5, 2014, 11:52:31 PM8/5/14
to Sam Fourman Jr., golan...@googlegroups.com
I like Brad's suggested "bucktooth" but I usually say "colon equals".

You could also say "declared as".



--

Skip Tavakkolian

unread,
Aug 5, 2014, 11:53:44 PM8/5/14
to Sam Fourman Jr., golang-nuts
i used Valley Speak as inspiration:

a := b

a "totally, like " b


--

Dan Kortschak

unread,
Aug 6, 2014, 12:27:25 AM8/6/14
to Brad Fitzpatrick, andrey mirtchovski, Sam Fourman Jr., golan...@googlegroups.com
On Tue, 2014-08-05 at 20:14 -0700, Brad Fitzpatrick wrote:
> "bucktooth" is the same number of syllables. "a bucktooth b"

Nice.

Billy Harvey

unread,
Aug 6, 2014, 12:34:11 AM8/6/14
to golan...@googlegroups.com
Way back when I was learning Occam I called it 'set equal' - not sure if that term was used in the language or not.

David Symonds

unread,
Aug 6, 2014, 12:52:57 AM8/6/14
to Sam Fourman Jr., golan...@googlegroups.com
Pascal assign.

Tamás Gulácsi

unread,
Aug 6, 2014, 1:00:47 AM8/6/14
to golan...@googlegroups.com
A := b
A let be equal to b.

Jan Mercl

unread,
Aug 6, 2014, 2:21:05 AM8/6/14
to Sam Fourman Jr., golan...@googlegroups.com
On Wed, Aug 6, 2014 at 5:02 AM, Sam Fourman Jr. <sfou...@gmail.com> wrote:
> I am wondering how to use := in a sentence, when speaking with another go
> programmer?

is

-j

Dan Kortschak

unread,
Aug 6, 2014, 2:25:31 AM8/6/14
to Jan Mercl, Sam Fourman Jr., golan...@googlegroups.com
On Wed, 2014-08-06 at 08:20 +0200, Jan Mercl wrote:
> is
>
> -j
>
is now

Jan Mercl

unread,
Aug 6, 2014, 2:51:25 AM8/6/14
to Dan Kortschak, Sam Fourman Jr., golan...@googlegroups.com
On Wed, Aug 6, 2014 at 8:25 AM, Dan Kortschak
<dan.ko...@adelaide.edu.au> wrote:
> On Wed, 2014-08-06 at 08:20 +0200, Jan Mercl wrote:
> is now

Much better ;-)

-j

chris dollin

unread,
Aug 6, 2014, 4:23:23 AM8/6/14
to Sam Fourman Jr., golan...@googlegroups.com
On 6 August 2014 04:02, Sam Fourman Jr. <sfou...@gmail.com> wrote:

> I am wondering how to use := in a sentence, when speaking with another go
> programmer?

I would call it `becomes` because it looks like the traditional assignment
symbol even though it's a declaration. Possibly I should review this reflex.

Chris

--
Chris "Pascal post-dates 'tradition'" Dollin

Benjamin Measures

unread,
Aug 6, 2014, 6:39:34 AM8/6/14
to golan...@googlegroups.com
On Wednesday, 6 August 2014 04:02:25 UTC+1, Sam Fourman Jr. wrote:
I am wondering how to use := in a sentence, when speaking with another go programmer?

IdentifierList "defined as" ExpressionList .
Message has been deleted

akwillis

unread,
Aug 6, 2014, 9:52:57 AM8/6/14
to golan...@googlegroups.com
short declaration ?...

Matt Harden

unread,
Aug 6, 2014, 9:59:11 AM8/6/14
to akwillis, golang-nuts
Realistically, "colon equals". But I love "bucktooth" for its humor and "is defined as" for its descriptiveness.


--

Daniel Skinner

unread,
Aug 6, 2014, 10:11:56 AM8/6/14
to Dan Kortschak, Jan Mercl, Sam Fourman Jr., golan...@googlegroups.com
I'd actually think

a := b
a is b

a = b
a is now b

since the latter implies `a` was something else before "now".


Michael Jones

unread,
Aug 6, 2014, 10:37:18 AM8/6/14
to Daniel Skinner, Dan Kortschak, Jan Mercl, Sam Fourman Jr., golan...@googlegroups.com
I read "a := b" as "a clone b" because I want to remember:

a begins life as identical to b
a and b live independent lives from that point forward


--
Michael T. Jones | Chief Technology Advocate  | m...@google.com |  +1 650-335-5765

JohnGB

unread,
Aug 6, 2014, 11:13:37 AM8/6/14
to golan...@googlegroups.com, dan...@dasa.cc, dan.ko...@adelaide.edu.au, 0xj...@gmail.com, sfou...@gmail.com
I was going to say "colon equals", but "clone" is much nicer.

Sameer Ajmani

unread,
Aug 6, 2014, 11:51:45 AM8/6/14
to Benjamin Measures, golang-nuts

When teaching a Go class, I'm explicit: "this statement declares a and initializes it to the value of b".

--

John Beckett

unread,
Aug 6, 2014, 12:03:34 PM8/6/14
to Sameer Ajmani, Benjamin Measures, golang-nuts
Catchy name :)


--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/qyrOifs48i4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.

Sameer Ajmani

unread,
Aug 6, 2014, 12:07:27 PM8/6/14
to John Beckett, golang-nuts, Benjamin Measures

I suppose "a spawns as b" would be more fun.

Staven

unread,
Aug 6, 2014, 2:28:06 PM8/6/14
to Sameer Ajmani, John Beckett, golang-nuts, Benjamin Measures
Double tadpole.

Kevin Gillette

unread,
Aug 6, 2014, 4:44:53 PM8/6/14
to golan...@googlegroups.com, sfou...@gmail.com
On Tuesday, August 5, 2014 9:05:44 PM UTC-6, kortschak wrote:
Although I don't use it, I like "gopher operator" (tilt head).

gopher? go... for?

go func() { for {} }()

Daniel Skinner

unread,
Aug 6, 2014, 5:16:42 PM8/6/14
to Kevin Gillette, golang-nuts, Sam Fourman Jr.
go... for? and multiply?

go func() {for {_ = rand.Int() * rand.Int()}}()


--

DV

unread,
Aug 6, 2014, 5:32:46 PM8/6/14
to golan...@googlegroups.com, saint....@gmail.com
Pardon my curiosity, but where do you teach these Go classes? Any of them recorded for the masses, by any chance? I really liked your "advanced concurrency patterns" video. 

Robert Melton

unread,
Aug 6, 2014, 7:23:39 PM8/6/14
to Andrew Gerrand, Sam Fourman Jr., golan...@googlegroups.com
On Tue, Aug 5, 2014 at 11:51 PM, Andrew Gerrand <a...@golang.org> wrote:
> I like Brad's suggested "bucktooth" but I usually say "colon equals".

I used (up until this thread) to say "colon equals" --- but from now
on -- "bucktooth".

--
Robert Melton | http://robertmelton.com

Matt Harden

unread,
Aug 6, 2014, 7:44:13 PM8/6/14
to Kevin Gillette, golang-nuts, sfou...@gmail.com
"Clone equals"?


On Wed, Aug 6, 2014 at 3:44 PM, Kevin Gillette <extempor...@gmail.com> wrote:

--

Sameer Ajmani

unread,
Aug 7, 2014, 7:31:39 AM8/7/14
to DV, Benjamin Measures, golang-nuts, Francesc Campoy Flores, Andrew Gerrand

I mostly teach internally at Google, but even that teaching has been largely supplanted by self serve resources like the Go tour.  We might be able to provide a video of our "Guided tour of Go" for external users.

Francesc Campoy Flores

unread,
Aug 7, 2014, 12:40:48 PM8/7/14
to Sameer Ajmani, DV, Benjamin Measures, golang-nuts, Andrew Gerrand
I'm getting started with screen casting, it is probably a good project to start with.

I added it to my todo list.
--
--

Ivan Hawkes

unread,
Aug 12, 2014, 7:54:59 AM8/12/14
to golan...@googlegroups.com
Back in '87 when I was a uni student learning Modula 2 / C our lecturer said to use "equals" for "==" and "is assigned the value" for ":=" and "=" which is a much larger mouthful but pretty quick when thinking / reading code. Consequently, when I read Go code I read that as "is assigned the value of", which is not quite accurate for what it does.

Maybe something a bit shorter is appropriate e.g. "allosign" for allocate and assign. This way you are reminded that you are creating a new variable store and assigning to it with one action.

Michael Jones

unread,
Aug 12, 2014, 9:26:47 AM8/12/14
to Ivan Hawkes, golang-nuts
repeating myself, but "clone" says it all.


On Tue, Aug 12, 2014 at 4:54 AM, Ivan Hawkes <ivan....@gmail.com> wrote:
Back in '87 when I was a uni student learning Modula 2 / C our lecturer said to use "equals" for "==" and "is assigned the value" for ":=" and "=" which is a much larger mouthful but pretty quick when thinking / reading code. Consequently, when I read Go code I read that as "is assigned the value of", which is not quite accurate for what it does.

Maybe something a bit shorter is appropriate e.g. "allosign" for allocate and assign. This way you are reminded that you are creating a new variable store and assigning to it with one action.

--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Benjamin Measures

unread,
Aug 12, 2014, 6:18:58 PM8/12/14
to golan...@googlegroups.com, ivan....@gmail.com
On Tuesday, 12 August 2014 14:26:47 UTC+1, Michael Jones wrote:
repeating myself, but "clone" says it all.

For
f := func(x int) int { return 2*x + 1 }
Is there really a clone involved? Do they then lead independent lives? Does the anonymous function "die"?

Rob Pike

unread,
Aug 12, 2014, 6:26:40 PM8/12/14
to Benjamin Measures, golan...@googlegroups.com, ivan....@gmail.com
I like "is" or "are", according to the number of variables.

a := 3

"a is three".

-rob

tomwilde

unread,
Aug 13, 2014, 2:28:59 AM8/13/14
to golan...@googlegroups.com
"The truth of the matter is that despite all objections, and in so far as `a`  has not been previously declared, it shall henceforth be defined to represent the value `b`"

Aka.

thetruthofthematter despiteallobjections insofaras a := "Hello, world!"

PS: this compiles


On Wednesday, August 6, 2014 5:02:25 AM UTC+2, Sam Fourman Jr. wrote:
Hello,

I am new to go, and while reading through the following doc.


I am wondering how to use := in a sentence, when speaking with another go programmer?

ajstarks

unread,
Aug 13, 2014, 10:43:04 AM8/13/14
to golan...@googlegroups.com
For me, it's always been:  a "gets to be" b

Robin Peters

unread,
Aug 13, 2014, 11:02:45 AM8/13/14
to golan...@googlegroups.com
As far as official documentation goes, the specs call it a 'short variable declaration' (http://golang.org/ref/spec#Short_variable_declarations) and the token package calls it define (http://golang.org/pkg/go/token/#Token).

So I would call it 'a declared by b' or 'a defined by b'.
Reply all
Reply to author
Forward
0 new messages