-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/31/10 03:33 , Moritz Lenz wrote:
> In this code:
> 
> sub test() { True };
> 
> given 0 {
>     when test() { say "OH NOEZ" }
> }
> 
> I don't think it's unreasonable to expect the output to be "OH NOEZ".

I think there's a confusion about what given/when is doing.  Naïvely(?), I
expect it to be shorthand where the value for "when" is matched against the
one for "given", thus your example would be (pseudocode) "if 0 == True" and
expecting "OH NOEZ" *would* be unreasonable.

Is given/when trying to do too many things at once?

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      allb...@kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxUOJsACgkQIn7hlCsL25WPlwCeJKwKQWDl+qaNbJMyAOcZ5UXf
R2EAn1AQBqB5hZIFmqymcaqSSGJdx9GJ
=cmZ6
-----END PGP SIGNATURE-----

Reply via email to