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

(tye)Re3: tr doesn't *really* use a list

by tye (Sage)
on Dec 28, 2000 at 00:56 UTC ( [id://48523]=note: print w/replies, xml ) Need Help??


in reply to Re: (tye)Re2: tr doesn't *really* use a list
in thread tr doesn't *really* use a list

I don't think saying (to boldly paraphrase you) that "($a,$b,$c) isn't really a List" helps people to understand Perl better. I agree that there is an important concept here. I disagree strongly that you should try to call this concept just "list".

But you did give me an idea for a "solution". We need a new term for the Perl data structure that is a list of scalar values (like "associative arrays" are now always called "hashes").

I'm tempted to suggest using this new term in place of "list" in "list context" (to give it more power to replace the existing "list" meme), but I think the "list" in "list context" is intentionally vague since it refers to the "left-hand side" rather than the result returned from the "right-hand side".

The best candidate I've come up with is "tuple".

Oh, well, it would never fly. It is much easier to argue that "length(@array)" is stupid and look how much support has been thrown behind the current definition when that has been brought up.

I'll just continue to use "list of scalar values", "operator that would return a list of scalar values if used in a list context", and "argument list" when I mean of the three most common forms of "Perl List". :-} (I don't yet have a good label for what goes between the parens in a foreach statement -- it is naively a "list of scalar values" but is functionally much more like an "argument list" but calling it the latter would confuse people.)

Update: I'm toying with "list of scalar [L]values" for "argument list" and foreach. (: (and I have mentioned recently that I hate fonts that make "l"s look like "1"s?)

        - tye (but my friends call me "Tye")
  • Comment on (tye)Re3: tr doesn't *really* use a list

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-18 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found