in reply to Re^10: If you believe in Lists in Scalar Context, Clap your Hands
in thread If you believe in Lists in Scalar Context, Clap your Hands
Of the two sentences you quoted, you only attempt to respond to one as far as I can tell.
The inclusion of the second sentence was accidental. I hadn't even read it. If JavaFan said that lists don't even exist, that I don't agree with him. I suspect that's not what he meant, though. I can't address this question for him.
Saying [...] does nothing to show that there's no context applied to the list.
I agree. Nothing will show that because everything is evaluated in some context.
Saying the values propagate from right to left through the contexts is equivalent to saying that the contexts propagate from left to right through the values.
Operands are evaluated in a context chosen by their operator. Precedence and associativity determine what is an operand to what operator, but doesn't otherwise affect context.
To clarify, by "an operator propagating a context onto an operand", I mean "an operator choosing to impose the same context upon an operand as the context imposed upon the operator itself".
What does "So while the list assignment is in scalar context, the assignee and assigned lists aren't." if the "list" doesn't exist?
Where did you get that from? I didn't say some list didn't exist. Quite the opposite, I showed two list operators in list context, so two lists were created.
What the heck is "list op'tor"? Does that stand for "list operator"?
Yup. I wanted to avoid reaching the default wrap length for code blocks.
() -- is a list?
Yes, an empty list literal.
scalar -- enforces scalar context?
Yes, onto its operand, the list assignement.
Show me the list assignment that is in scalar context here:
| v perl -E 'say scalar(() = ($a, $b, $c))' V L L S L \ L/ L \/ L
Is there a list there?
Multiple.
Is there a set of scalar values context assignment operator present other than the one between the empty set of scalar values and the set of three scalar values?
What's a "scalar values context assignment operator"?
In what context is the empty set of scalar values?
You mean the ()? List context. The () is the LHS of a list assignment operator, and a list assignment operator imposes a list context on its LHS operand. (On its RHS operand too.)
|
|---|