|
Shinyshell Community Forums > Coding > Perl 6 |
||||||
| Sign Up | Member List | New Posts | Help | |||
[1]
| August 28 02009, 20:08 GMT | ||||
|
SpaceMan Member Location: Earth Post count: 32 |
Perl 6 will be a completely new Perl, it will have all weird and complex features, advanced function parameters and all features of modern programming languages.
Here are some Perl 6 examples
sub somefunction($a, $b, :$c, :$d, *@e) {...}
somefunction(1, 2, :d<3>, 4, 5, 6); # $a=1, $b=2, $d=3, @e=(4,5,6)
somefunction(:b<2>, :a<1>); # $a=1, $b=2
and even looping 2 or more element at one time
for @points -> $a, $b {
line($a.x, $a.y, $b.x, $b.y)
}
Perl 6 also introduces roles, they acts like interfaces
class Mammal is Vertebrate {...}
class Dog is Mammal {...}
role Pet {...}
role Stray {...}
role Guide {...}
You no longer need () after if
if $a > 10 {
say "a > 10"
}
The Perl 6 article on Wikipedia: http://en.wikipedia.org/wiki/Perl_6 |
|||
| August 28 02009, 20:19 GMT | ||||
|
Pikachu Kelp is good! Location: California Post count: 50 |
Oh no, it's Perl! I programmed a bit in Perl, but I didn't really enjoy it much. It's one of the reasons why I switched to Python. That and Python is much cleaner.
______________________________ Linux | Chrome | Python | Chuck |
|||
| August 28 02009, 21:58 GMT | ||||
|
Kthar Krme jedno bezglavo Location: kroatie Post count: 106 |
Perl 6, a.k.a. Line noise 6, will contain a number of weird and wonderful features that people will have to spend years learning through a combination of buying thousands of books and meditating under a freezing waterfall daily.
|
|||
| August 29 02009, 00:56 GMT | ||||
|
SpaceMan Member Location: Earth Post count: 32 |
Perl 5 is hard enough, The scalar and list contexts are hard to remember
|
|||
| August 30 02009, 00:33 GMT | ||||
|
Pikachu Kelp is good! Location: California Post count: 50 |
I think I have forgotten most of my Perl learning. I probably only remember how to do if else statements.
______________________________ Linux | Chrome | Python | Chuck |
|||
[1]
|
Forum Information |
||||||||||
|
||||||||||
