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

Re^5: what would you like to see in perl5.12?

by blazar (Canon)
on Aug 21, 2007 at 10:54 UTC ( [id://634051]=note: print w/replies, xml ) Need Help??


in reply to Re^4: what would you like to see in perl5.12?
in thread what would you like to see in perl5.12?

But then you have a bare arrow on the left. Let me see, you have a situation like:
$foo -> THINGIE

where THINGIE happens to be do BLOCK.

With current syntax THINGIE can be:

  • a sub, array or hash dereferencing: (...), [...] and {...} respectively;
  • a bareword, interpreted like a method, with or without a pair of parens to pass parameters, if any: the latter, if present conveys a strong psychological feeling of being linked with the method itself as if they were a single thing;
  • a simple scalar value, to be interpreted as a symref (if not under strict) or a subref to be called like a method.

All these thingies are "boxed", while yours look like the juxtaposition of two other thingies, with no surrounding box. It simply doesn't fit well, and is aesthetically unappealing.

Granted, ->${\EXPR} looks awful, but it is an awful use of the existing syntax, which does not permit a more beautiful form. Your proposal makes for ugly syntax to start with: in all earnestness, looking at it from a distance it looks cleaner. But as you close up, you get an unsatisfactory feeling. Of course I would like to say that I have a much more beautiful proposal of my own, but no, I can't devise any...

Update: striked out text above thanks to a /msg by ysth - "a simple scalar can always be a coderef or a method name (either qualified or not); the latter is unaffected by strict".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-26 03:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found