Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

given/when in Perl 6

by logan (Curate)
on Mar 03, 2003 at 18:30 UTC ( [id://240113]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: There's a level in Hell reserved for ________
in thread There's a level in Hell reserved for ________

OK, I'll bite. What's a given/when and why is it important?

-Logan
"What do I want? I'm an American. I want more."

Replies are listed 'Best First'.
Re: given/when in Perl 6
by Elian (Parson) on Mar 03, 2003 at 18:33 UTC
    given/when is a switch on steroids. Rather than C's rather anemic "check against an integer value", it provides full smart matching semantics, very much like Damian's Switch module, on which it's based.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-29 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found