2 ms·
A lot of complaints usually affect niche or rare use cases in the language (or you learn them fast). Though I guess the same applies to PHP. It's a lot nicer
by zaarn 9y ago
A lot of complaints usually affect niche or rare use cases in the language (or you learn them fast).
Though I guess the same applies to PHP.
It's a lot nicer to write webapps in Go though since you have control over global state and not the per-request state of PHP, which makes for some easier solutions to problems (work-queues are easy to implement/use on the server-side unlike in PHP)
Also the stricter type system compared to PHP is nice in addition to static linking making it more portable than PHP (minus not being portable to shared hosters)
- k__ 9y agoYes, I'm not a big fan of PHP either. Guess the global state access and easier parallelization are the main selling points. I wrote a few APIs with long running queues in PHP and Node.js and found it both a bit too clunky for that job.
- icebraining 9y agoI don't think there's anything inherent in the language that prevents PHP from running like Go (daemon that receives requests, rather than being launched by an external server on each request). It's just a matter of convention.
- themihai 9y agoComparing PHP with Go it's a bit too much, don't you think? Type system, standard library, concurrency, compilation, packing ... I hardly find similarities.
- nine_k 9y agoSome don't mind: https://news.ycombinator.com/item?id=13430612 https://news.ycombinator.com/item?id=13430612
- themihai 9y agoI can't agree though. I believe using that rationale same could be said about C and many other languages...If that's the case then, should we expect a "fix" for the master programmers (i.e. Go++)? Let's hope that won't happen. Go is nothing like PHP. It was an attempt to modernise C though I believe it failed because Go can't do realtime.
- nine_k 9y agoC is far from perfection, but it's very small, fit well to the hardware of its day, and had a colossal "killer app", Unix. A fix for master programmers is e.g. Rust, and a bunch of GC-based languages, from newcomers like Crystal and Nim to the battle-hardened JVM ecosystem, or Erlang/Elixir. The way C++ did not displace C, or the way Ruby and Python did not displace PHP, these guys will not displace Go.