PyMyth: Global variables are evil... WRONG!

Chris Angelico rosuav at gmail.com
Wed Nov 13 23:53:38 EST 2013


On Thu, Nov 14, 2013 at 3:33 PM, Roy Smith <roy at panix.com> wrote:
> In article <mailman.2580.1384399784.18130.python-list at python.org>,
>  Chris Angelico <rosuav at gmail.com> wrote:
>
>> I have yet to see any language that gives true globals. At very best,
>> they're just process-wide! Honestly. How am I supposed to write code
>> that accesses variables running on my New York server?
>
> Any one of a slew of remote procedure call protocols.  These days, the
> cool kids are using REST, but people have been doing RPC-ish things ever
> since the first guy to connect two computers with a piece of wire.
>
> Wait, aren't you the guy who's into MUDs?

Yeah, I am. But there's this annoying difficulty with accessing
variables. I have to send messages around the world and get responses
back, I can't just type "global foo" and have foo be the same thing
here and everywhere else. I mean, it's called "global" for a reason,
why can't it be the same "foo" for every single process in the world?

Or if it's okay for "globals" to not be globally shared, then why is
it a problem for them to be per-module?

ChrisA



More information about the Python-list mailing list