Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: (tye)Re: Scalars, Lists, and Arrays

by merlyn (Sage)
on Apr 13, 2001 at 19:34 UTC ( #72364=note: print w/replies, xml ) Need Help??

in reply to (tye)Re: Scalars, Lists, and Arrays
in thread Scalars, Lists, and Arrays

The Perl documentation has two different things that both end up being casually called "list": "list values" and "list literals". A "list literal" is that comma-ish thing that turns into the comma operator in a scalar context (last value wins). A "list value" is the result from executing an operator in a list context. And yes, a list literal yields a list value in a list context, hence leading to the casual use of "list" for both.

In an ideal world, all naked "list" mentions would be expanded to either "list value" or "list literal" as appropriate. But most people generally figure it out by context (gah!) anyway.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: (tye)Re: Scalars, Lists, and Arrays

Replies are listed 'Best First'.
(tye)Re3: Scalars, Lists, and Arrays
by tye (Sage) on Apr 13, 2001 at 20:39 UTC

    One of the other threads I mentioned (tr doesn't *really* use a list), as you can tell from the title, shows how "list" is used in the Perl documentation to talk about at least one more thing than the two that you list. This appears to have caused at least a little confusion.

    I'd list all of the ways that "list" is used within the Perl documentation, but the thought of compiling such a list makes me listless. ;)

    I think that being able to talk about a "list" within a given documentation context is helpful in making the documentation easy to read. So no, I don't think changing "list" to "list literal" or "list value" everywhere would be an improvement.

    There are some places in the documentation that could be made more clear by being explicit about what is meant by "list" in that section.

    But I think the important thing is to get people to realize that they have to figure out what is meant by "list" in each context. And that is what I am trying to do.

            - tye (but my friends call me "Tye")

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://72364]
[Corion]: choroba: I'm still using spod5 as my pod-to-ooxml- converter didn't really get off the ground so far
[choroba]: Slidy is basically HTML, so I'm not sure I really fly high :)
choroba should make his presentation scaffolding public
[Corion]: choroba: spod5 converts pod to S5 HTML, so it's also still basic. I find the lack of animations (in the sense of "highlight this", "highlight that" in code) somewhat tedious as I do it with rendered PNGs
[Corion]: I haven't found a good way to include/use the source SVGs I use for creating the PNGs directly as animations
[ambrus]: Presentations come in many different shapes, and so slides do as well.
[Corion]: Doing that in Powerpoint or Ooxml would be nice(r) but I'm much quicker doing the outline of a presentation and the code as Pod

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (13)
As of 2017-09-26 10:01 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (293 votes). Check out past polls.