Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Why does Perl have typeglobs?

by RonW (Parson)
on Jul 08, 2014 at 19:39 UTC ( #1092779=note: print w/replies, xml ) Need Help??


in reply to Why does Perl have typeglobs?

Actually, typeglobs are more like structures than unions. Symbol table entries have a name field plus a value field for each type of value.

As for why the Perl symbol table was designed this way, my guess is that it was just easier to manage only one entry per name and, similarly, only one symbol table per package.

Personally, I think it would have been simpler to only allow a given symbol to be one type of value, that of its first use. Since this is in line with best coding practices, it would have been a reasonable design choice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2019-08-22 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?