Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2023-03-21 16:46 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (60 votes). Check out past polls.