I am a PHP developer by day, and have been for 10 years, but night I
spend all my time hip deep in Go code :)
I will tell you this, PHP and Go differ in more ways than they are
similar. They both approach particular problems in their own specific
and unique ways, so if you are a a PHP hacker, you may find that
starting with Go may be an uphill struggle. However, thats not to say
you shouldn't keep up with it!
Personally I find that Go conveniently fills the many gaps that PHP
has. We currently have many command line systems written in PHP that I
am hoping to re-write in Go, which results in a much more sustainable
system. It basically comes down to the way each language approaches
its core problem space: PHP will be forever trapped in the request-
response domain of web server request processing, which is fine and it
which it handles superbly. Go lets you do everything else :)
Things to look out for:
- PHP OOP: It doesn't translate to Go. It's just easier to forget all
that stuff and approach the Go type system for what it is. It will
save you loads of headaches and rewrites trust me :)
- Concurrency/Threading: PHP doesn't have this in any real-world way,
so this is all new and exciting (and powerful) stuff. Read and learn
this stuff, because this is were we have found the switch over point
from PHP to Go.
- Compilation: The quick compilation of Go programs may deceive you
into thinking development is very similar to PHP. It's not, and the
end result is more powerful, useful and surprising than you may
initially expect. Raw horsepower alone wil change the way you approach
software development than how you would as a PHP dev.
PHP is great and will always have a place in my heart, but try to
approach Go on its own terms; you'll get much much more out of it. And
it will make you a better PHP programmer for it too :)
Have fun!
Cheers!
> Gustavo Niemeyerhttp://niemeyer.nethttp://
niemeyer.net/plushttp://niemeyer.net/twitterhttp://niemeyer.net/blog