Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re4: MOPT-03 - identification, part 1

by mstone (Deacon)
on Jan 03, 2003 at 00:41 UTC ( #223915=note: print w/replies, xml ) Need Help??

in reply to Re: Re2: MOPT-03 - identification, part 1
in thread MOPT-03 - identification, part 1

  • Okay, now in applying this further to Perl specifically, is a list (in distinction from an array or a hash) an entity? It seems to me it is not, but rather a value like your string "hello world.\n" that must be placed within an entity in order to be usable.

If I'm understanding you correctly, the kind of list you're talking about would be a value, and yes, you'd store it in an entity like an array or a hash.

  • Also, where do anonymous entities, that is, anonymous subroutines and datastructures, fit in here? Are these entities that are not bound to a name, but rather have only references? Or are such things bound still in the theoretical sense, with the difference between named and anonymous thingies meaningful only at the language level?

First version.. an anonymous thingy is an entity, and the reference is the value of that entity. An anonymous entity has no bindings until we create one for it.

In practical terms, we have raw symbols, things that live in the storage heap, entries in a symbol table, and strings that we use in our code. The things in the storage heap encapsulate raw symbols, and the entries in the symbol table give us programmatic access to things in the heap.

The raw symbol is a value. We probably associate it with some human assumption, but it doesn't exist in the computer until we encapsulate it with an entity.

The thing in the heap is an entity. It encapsulates a value, which puts the symbol into the computer.

The entry in the symbol table is a binding. It gives us the power to access an entity whenever and wherever we want (subject to the scope limits of the binding itself).

The string we use in our code is the identifier. It's one field of the symbol table entry, and it's the thing we actually see when we look at a piece of code and think, "variable."

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://223915]
[BarApp]: I can not use modules. I gain temporary access and still can not use modules.
[Cosmic37]: ta erix - this szabo geezer is pretty cool methinks and he writes about undef but I cannot see instructions for redefining the record separator after having undefined it
[Corion]: $/ = "wahtever";
[Corion]: (it's a magic variable)
[karlgoethebier]: BarApp: whoami
[Cosmic37]: ok fankyou - I was wondering about that but thought there might be a redefine command or something; peachy
[Lotus1]: Cosmic37 if you undef $/ in a local context to a block it won't affect the global version after the block finishes
[Lotus1]: or you can just do local $/ in a block

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2017-06-29 16:50 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (672 votes). Check out past polls.