Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^6: If you believe in Lists in Scalar Context, Clap your Hands

by chromatic (Archbishop)
on Oct 29, 2008 at 19:28 UTC ( #720310=note: print w/replies, xml ) Need Help??

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

I am talking about the semantics of Perl and you seem to be talking about the operation of perl.

Where do you think the semantics of Perl come from? The holy writ of magic candy-flavored flying unicorns? (However more maintainable that might be, there are actual and deterministic algorithms behind those semantics, which is sort of exactly precisely what people expect from a programming language.)

Feel free to argue with you think the semantics of Perl should be. Unless they match the documented and tested and empirically verifiable behavior of multiple versions of Perl, they're wrong, and you're wasting your time.

However much someone used to Python might think that parentheses make a list of constant expressions into a list in Perl, they don't. They merely group the expressions to disambiguate intended precedence. Perl's semantics aren't a matter of anyone's fiat, unless you want to anthropomorphize the code.

  • Comment on Re^6: If you believe in Lists in Scalar Context, Clap your Hands

Replies are listed 'Best First'.
Re^7: If you believe in Lists in Scalar Context, Clap your Hands
by ig (Vicar) on Oct 30, 2008 at 01:07 UTC

    I am increasingly inclined to agree with you, that Perl is not a language in its own right but merely a description of what some perl program does.

    Even so, abstractions can facilitate use and understanding. Perl and perl should be consistent, but to the extent that Perl is an abstraction rather than the full source code, it comes from people trying to understand and explain perl rather than from perl itself.

    In addition to facilitating understanding and use, elaboration of simple and unsurprising abstractions can help to identify ways in which perl and Perl might be improved. What it could and possibly should be is not what it is, but that doesn't mean discussing these possibilities is a waste of time. Without such discussion, there would be little basis for deciding what do do in the next release.

    This particular Meditation may never inform or motivate an improvement in perl, but some do. Or are the developers of perl so remote from PerlMonks that nothing here makes any difference to what they do?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://720310]
[chacham]: ought to be a check constraint.
[chacham]: there's a regexp function. if that can be used ina check() constraint...
[LanX]: Thanks, but no check constraints in MySQL :/
LanX 1 ..2 ..3 ..4 .. is erix missing ;-)
LanX is Discipulus reciting "Springtime for Hitler" ?
[choroba]: erix could tell you how to do it in Postgres

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2017-03-30 15:06 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (360 votes). Check out past polls.