A lot of systems are built in layers. Games are often split into engines and scripts. Another classic is the "three tier" architecture with data storage, application model, and view-controllers split out onto individual machines.
But more often, I run into systems where code is taking a core sample instead of building on the layers.
Showing posts with label scope. Show all posts
Showing posts with label scope. Show all posts
Monday, October 29, 2012
Monday, February 28, 2011
Variable scope, require, and use
I ran into some interesting problems in Perl, which invoked more learning around the require/use mechanisms and how constants are interpreted. In this post, I'll lay out some general terms about variable scoping, such as lexical scope, dynamic scope, the differences between them, and how they all interact in Perl. And then I'll cover require and use with that foundation in place.
If you've been wondering about lexicals or closures, this is your post. I've tried to lay things out more or less from basic principles, despite the verbosity of the approach, because this has taken me years to understand. I started programming with Perl in 2000 and still learned a bit more about it today. Yes, it's 2011 now. Hopefully, you can read this and get it in less time.
If you've been wondering about lexicals or closures, this is your post. I've tried to lay things out more or less from basic principles, despite the verbosity of the approach, because this has taken me years to understand. I started programming with Perl in 2000 and still learned a bit more about it today. Yes, it's 2011 now. Hopefully, you can read this and get it in less time.
Subscribe to:
Posts (Atom)