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

Re^5: Seeking Perl docs about how UTF8 flag propagates

by pryrt (Abbot)
on May 18, 2023 at 20:29 UTC ( [id://11152285]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Seeking Perl docs about how UTF8 flag propagates
in thread Seeking Perl docs about how UTF8 flag propagates

It does not return a "LIST". ... No list

Colloquially or not, the documentation I referenced specifically states that split returns a list, and I quote: "Splits the string EXPR into a list of strings and returns the list in list context". As such, "list" is canonical terminology for what split returns in list context, until such time as it is removed from the docs. I will continue to maintain that split does return a list, your "No list." notwithstanding.

If you are instead quibbling with my use of ALL CAPS to try to show it as a term, would you prefer I had said "list" (with "air-quote"-style quotes) instead? (In evidence of the fact that I was using ALL CAPS to be a term that I am trying to define, I also did the ALL CAPS for ARRAY, and that's not how the documentation refers to the data type, either.)

There's no such data structure.

In my paragraph on LIST or "list" or however you want me to type "the concept of list in Perl documentation", I never once called it a "data structure" or "data type". Contrariwise, I very specifically called an ARRAY or "array" a "data type" (well, I typed "datatype", sorry) because that's what the docs call it.

I was trying to help the O.P. differentiate concepts: the concept of the list construct (and with my link, obliquely to list context) compared to the concept of the array data type.

As for "LIST" spelled like that, the docs use this to refer to an expression evaluated in list context

Can you point me to a document that makes this distinction? I was trying to see if they had a formal definition of LIST in all caps anywhere, but couldn't find it; the List value constructors was the only section that I could readily find that tries to define a "list" of any sort.

Replies are listed 'Best First'.
Re^6: Seeking Perl docs about how UTF8 flag propagates
by ikegami (Patriarch) on May 19, 2023 at 16:40 UTC

    I never once called it a "data structure" or "data type".

    But you did say it's returned instead of an array. You didn't use the words "data structure" or "data type", but you repeatedly presented it as something comparable to an array.

    And then you started to mix two different meanings of list. (It does not return a "list value", which refers to Perl code.) "List" is a dangerous word to use.

    Can you point me to a document that makes this distinction?

    Here's where the documentation uses LIST

    chmod LIST chomp( LIST ) chop( LIST ) chown LIST die LIST exec LIST exec PROGRAM LIST formline PICTURE,LIST grep BLOCK LIST grep EXPR,LIST import LIST join EXPR,LIST kill SIGNAL, LIST map BLOCK LIST map EXPR,LIST no MODULE VERSION LIST no MODULE LIST open FILEHANDLE,MODE,EXPR,LIST pack TEMPLATE,LIST print FILEHANDLE LIST print LIST printf FILEHANDLE FORMAT, LIST printf FORMAT, LIST push ARRAY,LIST reverse LIST say FILEHANDLE LIST say LIST sort SUBNAME LIST sort BLOCK LIST sort LIST splice ARRAY,OFFSET,LENGTH,LIST sprintf FORMAT, LIST syscall NUMBER, LIST system LIST system PROGRAM LIST tie VARIABLE,CLASSNAME,LIST unlink LIST unshift ARRAY,LIST use Module VERSION LIST use Module LIST utime LIST warn LIST

    The syntax used to describe the syntax of Perl operators is not documented, but it is consistent. LIST always represents an expression evaluated in list context. (Contrast that with my, our and state which use VARLIST.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-24 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found