Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Why does Perl have typeglobs?

by ikegami (Pope)
on Jul 08, 2014 at 21:33 UTC ( #1092804=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why does Perl have typeglobs?
in thread Why does Perl have typeglobs?

It was why they are structs with a bunch of pointers to different things

Perl can have arrays, scalars, hashes, etc with the same name. Therefore, the symbol table entry for a name must be able to hold all of them.

I don't think that too many people actually do that, am I wrong?

It doesn't matter how many do. It just matters if they can. That said, virtually every program uses both $_ and @_. The numerous programs using <> use $ARGV, @ARGV and *ARGV{IO}.

Replies are listed 'Best First'.
Re^4: Why does Perl have typeglobs?
by Anonymous Monk on Jul 08, 2014 at 22:15 UTC
    I thought about it some more, and it appears that efficiency can't be the reason. I don't see why symbol tables even need to have any structs (as opposed to just bare pointers). Judging by the header you provided, the glob doesn't actually do much of anything, other that being a collection of pointers. So it was "Larry's idea" then, I guess :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1092804]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2019-08-21 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?