Sorry, but those are entirely trivial syntactic issues, and not very interesting at that either...
Sorry, but those are entirely trivial syntactic issues, and not very interesting at that either...
Lisp, Erlang, and Prolog (sure some other languages I've missed) have direct equivalents to Ruby symbols; they are sometimes referred to as symbols other times as atoms.
Saying they are a trivial syntactic issue just means you don't understand what symbols are.
> Symbols persist across multiple requests; this is a big part of why they are so beneficial.
That is still not really useful, PHP throws the entire execution context away after the request has finished. There is no sharing nor anything to persist unless you're doing so with an external data-store.
What doesn't happen compared to CGI, IIRC, is loading the whole PHP engine from the start for every invocation. But no request specific memory is ever shared between invocations.
Shared-nothing turns out to be really nice for scaling web apps. One of the few things PHP got right from the get-go.
The parent stated, "Sorry, but those are entirely trivial syntactic issues, and not very interesting at that either..."
My point was that symbols/atoms are much more than just a syntactic difference and that they are in fact quite interesting. Chicago Boss, an Erlang framework, takes these ideas to an extreme to push the limits of shared immutable memory on a web server.
http://www.chicagoboss.org/about.htm
I'm not a big fan of the way he trashes pretty much every alternative at the beginning of his description; there are many web frameworks built on many different languages that the market has proved out are sufficiently scalable.
It is however an interesting and different approach that I think we can both agree goes far beyond "trivial syntactic issues".
I mean, you technically could, but it's not what they are used for.
Granted, Ruby's use of symbols is not as pretty as other languages...