Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Plans por Perl6 running in the JVM

Name: Anonymous 2013-01-10 8:20

1) GOOD?
2) BAD?
3) POTATO?

Name: Anonymous 2013-02-19 11:49

>>40
@ It is not a type. It is a container. You can use types also if you like


my Str @x = ('a', 'b', 'c');
my Int @n = (1,2,3,4);
sub head(Int @arr) { return @arr[0] };

say head( @x ); # This fails
say head( @n ); # This works

Name: Anonymous 2013-02-19 11:55

>>41
container is not a type
retard-kun?

Name: Anonymous 2013-02-19 12:01

>>42
yes? XD ^^

Name: Anonymous 2013-02-19 12:05

@, $, % does not really define a type system. It just offers different ways of organizing your data. I understand that in your mind, an Array is a type. But saying that in Perl6 $, @ and % define a type is not the same.

Vanilla Perl5 has no types, but containers. It is the same in perl6 (at least, that is how i see it)


my @a = (1,2); say @a.WHAT;  # prints Array()
my Int @b = (3,4); say @b.WHAT; # prints Array+{TypedArray}()

Name: Anonymous 2013-02-19 12:41

>>44
my Int @b = (3,4); say @b.WHAT; # prints Array+{TypedArray}()
butt ugly.

Name: Anonymous 2013-02-19 19:39

>>45
I guess you know that # is a comment in perl. What's ugly about the code part?

Name: Anonymous 2013-02-19 20:44

>>1 But can it handle TAILCALL OPTIMZIATIOn

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List