I found some of the perl 6 new features really neat:
- creating your own type
- type casting
- junctions
- multidispatch
- :r:w:a shortcuts
- hyper operators
- some kind of oop keywords
But there are some changes in the grammar which
benefits aren't that obvious :
1- $str1 ~ $str2
2- $life = (!$monster) ?? 'safe' !! 'dead';
3- given $operator {
when '' {}
}
I do not really understand the new concatenation
style when most of the time it's '+' or '.'
I don't see how putting 2 questions marks and 2 exclamations marks
make things shorter and easier to understand.
The given ... when doesn't seem to bring that much from switch ... case
given ... if would make a little bit more sense.
And hashes require '=>' but it could be nice to switch to ':'
because then :(or perhaps we can use whatever separator we want?)
{
elems : {
deleting : {
ids : [1,2,3],
names : ['concatenation','ternary operator','switch']
},
replace : {
with : ['.','?:','switch...case']
}
};
And I know this may not sound that much but it could be sent to
javascript or actionscript or any ecmascript based languages.
This discussion has certainly be done a long time ago
but give it a try.
(any reference of functions include in perl6?)