Live data from Hacker News

Why you PHP guys should learn Golang

mikespook.com

31–40 of 54 posts

Re: Why you PHP guys should learn Golang

#31
post #29

Earlier quoted context omitted.

Most web developers who read Hacker News don't host their stuff with a hosting provider that doesn't even provide shell. With Go you just need to be able to execute a binary. You sounded a lot like Go hasn't proved it's viable for "web scale." It has. Is it as widely deployed? Of course not, it's new. I'm not sure what strength of PHP you're referring to--I'm assuming the ubiquity with shared hosting providers--but i…

> You sounded a lot like Go hasn't proved it's viable for "web scale." It has. Is it as widely deployed? Of course not, it's new. This depends on what is your definition of "widely deployed": http://go-lang.cat-v.org/organizations-using-go

I meant as widely deployed as PHP. I'm not sure that that is a measure of anything at all though, except that itself. It's certainly not an indicator of any kind of code or API quality.

Re: Why you PHP guys should learn Golang

#33
post #27
post #25

Most of the benefits he explained in the post also apply to Java (e.g. easy to use, GC, type system & concurrency). IMHO, if a programmer only know PHP and want to explore, I would suggest Java/Scala/Python/Ruby as the next language instead of Go.

Java and Go's type systems are very different, Go's is much more lightweight, had implicit interfaces (aka "static duck typing") and has an improved form of composition instead of inheritance. And concurrency in Go compared to Java is like day and night. Then there is the simplicity and clarity of the standard libraries, and so on.

The difference between Go and Java is one issue which I have no interest to argue, but if you read the whole article in detail and will find `most of the features` he discussed are already provided by Java.

1. Golang is a compiled language with a static type system. You have no chance to confuse veriable types

2. You must have already felt some powerlessness to PHP. It dosen’t have concurrent mechanism build-in..

3. Golang has GC, there is no need to care about memory management

4. Golang is also a C family’s programming language. Eh… with a litte syntax difference.

and more..

Re: Why you PHP guys should learn Golang

#34

It doesn't seem to me that there is a whole lot of overlap between the virtues or sweet spot of PHP and those of Go. Go is not a particularly hard language for the level it's designed at (though I'm not sure that remembering keywords is really a primary usability concern for any language)... but if you are just trying to slap together a web app and feel intimidated by deploy details and want to use cheap shared hosti…

Agreed. I was interested up until this point..."Your PHP scripts will be evaluated by SAPI components: web server module, PHP-fpm or CLI. All needed for PHP deploying is a SAPI environment."

What? Sorry but I know nothing about deployment. Should I? In the past I've only used PHP to solve simple problems.

Re: Why you PHP guys should learn Golang

#35

It doesn't seem to me that there is a whole lot of overlap between the virtues or sweet spot of PHP and those of Go. Go is not a particularly hard language for the level it's designed at (though I'm not sure that remembering keywords is really a primary usability concern for any language)... but if you are just trying to slap together a web app and feel intimidated by deploy details and want to use cheap shared hosti…

Agreed. I was interested up until this point... "Your PHP scripts will be evaluated by SAPI components: web server module, PHP-fpm or CLI. All needed for PHP deploying is a SAPI environment." What? Sorry but I know nothing about deployment. Should I? In the past I've only used PHP to solve simple problems.

You don't necessarily need to know about the SAPI, but what he says is true. Any environment (Apache, Lighttpd, FPM, CLI, ...) that runs PHP, is built on top of the SAPI provided by the Zend Engine.

That's interesting stuff, but not on the "must know" list.

Re: Why you PHP guys should learn Golang

#36
How can you possibly write an article telling PHP programmers to develop in Golang instead without writing anything about web programming in Golang ?

Why do people use PHP mostly ? For web development.

Why PHP guys should learn Golang should at least tell PHP guys if it's possible to do web development in Golang, and how, and show them how it's better suited (without telling them only "it's a better language").

Re: Why you PHP guys should learn Golang

#37

Oh good yet more comments about why PHP is trash and how your intelligence and social status are dictated by what language you are using. I almost don't click on posts about programming languages any more. Yet here i am, commenting..

I primarily develop using PHP. I read the first few lines of this article, got to this 'PHP is easy to learn. Golang is as easy as PHP!' and basically read, 'Hey thicko PHP guy, you could probably learn to use this language, cos its simple enough for your addled brain'. The immediate feeling of condescension turned me off.

Let's try this with me...

The original: "PHP is easy to learn. Golang is as easy as PHP!"

Some str_replaces:

"Ruby is easy to learn. Golang is as easy as Ruby!"

"Clojure is easy to learn. Golang is as easy as Clojure!"

"Python is easy to learn. Golang is as easy as Python!"

Hmm, I'm still not feeling offended. Are you sure this might not be some sort of inferiority complex at play? I think a lot of PHP developers get needlessly offended whenever we talk about PHP, positive or negative.

Re: Why you PHP guys should learn Golang

#40

Earlier quoted context omitted.

Stop reading between the lines, I didn't say PHP was better as a language. What I was saying was that trying to convert PHP developers into Go programmers with those kind of arguments shows a basic lack of understanding of how web applications work, or what is the real strength of PHP.

Most web developers who read Hacker News don't host their stuff with a hosting provider that doesn't even provide shell. With Go you just need to be able to execute a binary. You sounded a lot like Go hasn't proved it's viable for "web scale." It has. Is it as widely deployed? Of course not, it's new. I'm not sure what strength of PHP you're referring to--I'm assuming the ubiquity with shared hosting providers--but i…

Again, you assumed wrong. Makes me wonder what your actual experience with PHP is. The strength of PHP is its focus on the web environment through features and functions that make it simpler to develop in that environment, that have be implemented in code on most other languages. In addition, the huge amount of available mature libraries for a variety of purposes and the large community that supports it, is something I really find hard to believe Go can compete with. Saving development time with mature code is much more important than learning a language that doesn't provide much tangible benefits for the web environment.
Post reply on HN