in reply to Re^18: If you believe in Lists in Scalar Context, Clap your Hands
in thread If you believe in Lists in Scalar Context, Clap your Hands

Other than calling it specifically my model, I can fully endorse this post. I don't prefer one model over the other, as I still don't see a definite general-case benefit to one or the other. I just like to defend the model that people criticize if I see merit in it. I'll also criticize a model others endorse if I see flaws. I'll even defend the strong points and criticize the weak points of the same model.

In specific cases, I think this one helps some people. In other specific cases, I think the model ysth, tye, JavaFan, merlyn, and yourself use is more helpful (and more precise with relation to the actual implementation).

Mostly I like for people to be able to choose which one works for them. I've avoided disclosing my particular mental model up to this point because I don't think that how I personally think about it when I program is that relevant to whether or not a particular model is useful to others.

If people really must know...

Personally, I've discussed the topic so much for so long that I don't even have one that I consistently use more than the other. I've reached a point of ambivalence about my internal mental model and switch with my mood. Mostly though I just avoid silly constructions like:

$foo = scalar( ($x1, $y1) = ($x2,$y2) );
because what happens there depends on choosing one model or the other and could be written clearly with a few more characters. Also, who gives a crap about finding the length of a static list in the first place? ;-)

You do recognize and understand the workings of the model as I understand it, though, and I think it admirable you went through the trouble to do so.