Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Is glob feature really useful?

by xiaoyafeng (Deacon)
on Jan 10, 2021 at 09:23 UTC ( #11126696=note: print w/replies, xml ) Need Help??


in reply to Re: Is glob feature really useful?
in thread Is typeglob feature really useful?

So are you asking to abandon sigils?

ehh no, sigil is the spirit of perl. no sigils no perl. what I mean is perl allows a same name but different type. and It's also a good feature but perl sacrificed much performance for it.

for support this feature, perl have to create a 6elments hash to store one name. see below:
like a package scalar variable: $FOO = '123'; actually store: *Foo{SCALAR => '123', HASH => '', ARRAY =>'', GLOB => '', PACKAGE => ' +', NAME =>''},
If we discard above feature, we could store a scalar on STASH directly. To me it's more understandable and maybe faster.




I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Replies are listed 'Best First'.
Re^3: Is glob feature really useful?
by LanX (Sage) on Jan 10, 2021 at 11:21 UTC
    That's only the case with our variables and subs.

    Package variables are the exception and sub lookup is optimized AFAIK.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2021-09-17 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?