Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
4ad
on March 19, 2012
|
parent
|
context
|
favorite
| on:
Go is amazing, period.
:= and = don't do what you probably think they do, the meaning is not the same as in Pascal. If you need to compare two variables, you use ==
if a == b {}
= is the usual assignment, := declares and initializes a variable inferring the type.
var a int a = 42
vs.
a := 42
That means you'll see explicit types in variable declarations rarely.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: