Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Named Subroutine Parameters: Compile-time errors vs. Run-time warnings

by LanX (Saint)
on Jun 02, 2009 at 22:45 UTC ( [id://767809]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Named Subroutine Parameters: Compile-time errors vs. Run-time warnings
in thread Named Subroutine Parameters: Compile-time errors vs. Run-time warnings

"It's something that would be easy to test at compile-time, ergo it must be tested at compile-time".

Maybe the edge case that it's not possible to decide at compile-time if this hash  %h = (  key => @arr ) has a well-formed list at RHS with an even number of elements (how many elements will @arr have ???) makes it not so easy to test it generally at compile-time?

A good work-around might be to throw a warning if arrays are used as hash-values after a fat comma... I would really like it this way, since list-flattening in values really seems too "odd" to me!

Cheers Rolf

  • Comment on Re^3: Named Subroutine Parameters: Compile-time errors vs. Run-time warnings
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2025-06-20 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.