4 ms·
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
by nl 14y ago
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.
- sirclueless 14y agoAll 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 http://golang.org/pkg/net/http/#ListenAndServe
- nl 14y agoYes, 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.