Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Is typeglob feature really useful?

by eyepopslikeamosquito (Archbishop)
on Jan 10, 2021 at 10:50 UTC ( [id://11126700]=note: print w/replies, xml ) Need Help??


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

I don't know why typeglobs were removed from raku and my google-fu wasn't good enough to find a clear explanation of Larry's rationale for this. However, I did find How naming of variables works in Perl 6 by Elizabeth Mattijsen which states:

As you may have noticed, Perl 6 does not have a * sigil nor the concept of typeglobs. If you don't know what typeglobs are, you don't have to worry about this. In Perl 6, the sigil is part of the name stored in a symbol table, whereas in Perl 5 the name is stored without the sigil. For example, in Perl 5, if you reference $foo in your program, the compiler will look up foo (without sigil), then fetch the associated information (which is an array), and look up what it needs at the index for the $ sigil. In Perl 6, if you reference $foo, the compiler will look up $foo and directly use the information associated with that key. Please do not confuse the * used to indicate slurpiness of parameters in Perl 6 with the typeglob sigil in Perl 5 -- they have nothing to do with each other.

To make any sort of case for their removal from Perl 5, you'll need to do more than assert that "the current implementation for it decrease performance". You'll need to prove it by publishing some benchmarks. Given the backward compatibility nightmare that would be unleashed if typeglobs were removed from Perl 5, it seems preferable to me to leave them in the language and instead try to improve their performance. Admittedly, that's not for me to say, I don't have the skills or desire to be a Perl 5 pumpkin. If you feel strongly enough about it, I suggest you publish some benchmarks and discuss on P5P.

  • Comment on Re^3: Is typeglob feature really useful?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-19 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found