Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S02 still refers to Int|Str as a type constraint, STD.pm disallows it #12

Closed
pmichaud opened this issue Jul 3, 2012 · 1 comment
Closed

Comments

@pmichaud
Copy link
Contributor

pmichaud commented Jul 3, 2012

http://irclog.perlgeek.de/perl6/2012-07-03#i_5779999

13:09 <hoelzro> can you junction types? ex. has Str|Int $.str-or-int?
13:09 <moritz> std: my Str|Int $foo
13:09 <p6eval> std fd2647b: OUTPUT«===SORRY!===?Multiple prefix constraints not yet supported at /tmp/cqnj_WxWXJ line 1:?------> my Str?|Int 
               $foo?Malformed my at /tmp/cqnj_WxWXJ line 1:?------> my Str?|Int $foo?    expecting any of:?      multi_declar…
13:09 -!- JimmyZ_ [~chatzilla@14.154.211.176] has quit [Read error: Connection reset by peer]
13:09 -!- JimmyZ__ is now known as JimmyZ_
13:09 <moritz> so, "no"
13:09 <hoelzro> =(
13:10 <moritz> with "not yet supported", STD.pm means "not a goal for 6.0"
13:10 <hoelzro> ok
13:10 <pmichaud> S02 says you can, btw.
13:10 <pmichaud> Anywhere you can use a single type you can use a set of types, for convenience
13:10 <pmichaud> specifiable as if it were an "or" junction:
13:10 <pmichaud> my Int|Str $error = $val;              # can assign if $val~~Int or $val~~Str
13:10 <pmichaud> S02:1754
13:10 <pmichaud> that's possibly a fossil.
13:10 <moritz> I'm pretty sure that's fossil
13:10 <masak> fossil.
13:10 <hoelzro> does Rakudo support it, though?
13:11 <masak> we do that with subtypes nowadays.

Pm

@pmichaud
Copy link
Contributor Author

pmichaud commented Jul 3, 2012

19:32 <moritz> pmichaud: note that the section that contains 'my Int|Str $var' is already marked as Conjectural in the heading
19:33 <pmichaud> moritz: good point.  
19:34 <moritz> which in p5 land would have been "here be dragons" :-)

@pmichaud pmichaud closed this as completed Jul 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant