in reply to Is typeglob feature really useful?

we all know, Perl support same name but different type, that means $foo and @foo could be both exist without any violation.

It is singular, plural and named items. Remeber, perl was invented by a linguist. Identifiers are stems from which substantives (singular and plural) and verbs can be derived, etc.

Same as in English e.g. "cow" and "cows" where $cow is one cow and @cow is a herd, %cow are the pet cows callable by name. Well, $cow could contain a cat, @cow could contain a gang of bulls and %cow the members of the cowboy family, but that's meant as freedom for the programmer to introduce bugs.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^2: Is glob feature really useful?
by xiaoyafeng (Deacon) on Jan 10, 2021 at 09:29 UTC
    Yeah, I know it's feature, but I mean it is really worth? or maybe the current implementation for this is not good enough. see my above reply.




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

      It is simply one of those things that is so intrinsic to the language that one can never contemplate getting rid of it.