News for hackers. Stuff that matters.
Re:Dumping PHP For Go by nl on Tuesday July 10, 2012 @12:15AM (#4222086)
Ignoring the weird ideas about dynamic languages

memory is shared for each request

What does this even mean? Something like an Apache module (as an example in C) may or may not share memory depending on how it is written, but there is nothing that means it must share memory.

All sensible web programming environments have a stateless programming model (if that is what you meant). Some add state on top of that using sessions etc, but that can be in any language.

Re:Dumping PHP For Go by sirclueless on Tuesday July 10, 2012 @12:45AM (#4222170)

    All sensible web programming environments have a stateless programming model
By default, Go doesn't. The default HTTP server in Go works by calling into your code via a callback, and you are free to maintain any state you wish across requests.[1]

I don't consider this a problem in Go, because the good module system and scoping rules mean that global state is explicit and obvious, and a good concurrency model means that accessing global state can be done safely. Global state can be useful and performant, so I'm glad Go lets you take advantage of it, but it might rule it out as a "sensible web programming environment" by your definition.

[1] http://golang.org/pkg/net/http/#ListenAndServe

Re:Dumping PHP For Go by nl on Tuesday July 10, 2012 @04:36AM (#4222678)
Yes, that is a fair point. Perhaps I could have better said that all sensible web programming environments give you access to a stateless programming model.