One thing I would’ve blogged about last night if I had had the energy to remember it was that I leave tomorrow for Digital Identity World 2003 — not as much sheer fun as FooCamp or BloggerCon, but there’ll be fun and important work to be done.
My job is to sit up front and nod while Doc and Marc and Simon Grice (of etribes and Midentity) talk over the topic, “Grassroots Identity: Does It Have a Chance?” Doc is also giving a keynote; he’s thinking about this sort of approach. Marc points toward his views with his comments on a post from Kevin Werbach. And Simon will, I suppose, be explaining Midentity.
Posted by AKMA at October 14, 2003 10:22 AM | TrackBackWe can see an example of this in our code we've written so far. In each function's block, we declare variables that hold our data. When each function ends, the variables within are disposed of, and the space they were using is given back to the computer to use. The variables live in the blocks of conditionals and loops we write, but they don't cascade into functions we call, because those aren't sub-blocks, but different sections of code entirely. Every variable we've written has a well-defined lifetime of one function.
Posted by: Gawen at January 13, 2004 08:52 AMLet's take a moment to reexamine that. What we've done here is create two variables. The first variable is in the Heap, and we're storing data in it. That's the obvious one. But the second variable is a pointer to the first one, and it exists on the Stack. This variable is the one that's really called favoriteNumber, and it's the one we're working with. It is important to remember that there are now two parts to our simple variable, one of which exists in each world. This kind of division is common is C, but omnipresent in Cocoa. When you start making objects, Cocoa makes them all in the Heap because the Stack isn't big enough to hold them. In Cocoa, you deal with objects through pointers everywhere and are actually forbidden from dealing with them directly.
Posted by: Botolph at January 13, 2004 08:53 AMOur next line looks familiar, except it starts with an asterisk. Again, we're using the star operator, and noting that this variable we're working with is a pointer. If we didn't, the computer would try to put the results of the right hand side of this statement (which evaluates to 6) into the pointer, overriding the value we need in the pointer, which is an address. This way, the computer knows to put the data not in the pointer, but into the place the pointer points to, which is in the Heap. So after this line, our int is living happily in the Heap, storing a value of 6, and our pointer tells us where that data is living.
Posted by: Wombell at January 13, 2004 08:53 AM