http://qs321.pair.com?node_id=11126696


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 (Saint) 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