* Strings that are made of Unicode grapheme clusters instead of codepoints or bytes. This means that a substr() operation for example can't even accidentally rip a apart a base character and a combining character on top of it
* Grammars as a language feature
* Gradual typing
* A built-in meta object protocol
* Concurrency based on high-level primitives (promises, queues, supplies, ...) with syntactic support (instead of threads and locks; which are still available if necessary, but discouraged, because they don't compose well).
* Lazy lists
Its power is amplified by the part Perl 6 regexes are better than anything there is out there.
Even better, this extends beyond ASCII and applies to Unicode too. And will work with other powerful control structures.
I'd fix that date to something like 2027.
For eg. See the parse dialect which is a TDPL that comes with Rebol / Red
- http://www.rebol.com/docs/core23/rebolcore-15.html
- https://en.wikibooks.org/wiki/REBOL_Programming/Language_Fea...
- http://www.red-lang.org/2013/11/041-introducing-parse.html
"... POSIX doesn’t promise you’ll get UTF-8, or even ASCII. It promises ... a bunch of bytes. We can now cope with this properly – surprisingly enough, thanks to the power of NFG. We now have a special encoding, UTF-8 Clean-8-bit, which turns bytes that are invalid as UTF-8 into synthetics, from which we can recover the original bytes again at output. This means that any filename, environment variable, and so forth can be roundtripped through Perl 6 problem-free. You can concat “.bak” onto the end of such a string, and it’ll still work out just fine."
From https://6guts.wordpress.com/2015/11/21/what-one-christmas-el...
One that has caught my fancy are various uses of the "Whatever Star". This appears as a * in a few contexts. In many it is really a shortcut for the "Whatever" class, so you can use it in function signatures to enter sort of "automatic mode".
@shuffled_names = @names.pick(*) # randomly pick... however many you have. whatever.
But I think more interesting and different than that is using whatever-star as an automatic lambda thing. @nums.map(*/2 + 3) # expression-lambda from context around a whatever-star
@nums.map( -> $n { $n/2 + 3 } ) # equivalent with a real stabby arrow lambda
@nums.map( { $^n/2 + 3 } ) # $^n is a generated alphabetical-positional argument
I suppose this isn't really fundamental... but is definitely different.In Perl 6, detecting that an operand is "missing" isn't possible due to the existence of prefix/infix/postfix operators with the same names, so it expects a "whatever" star in place of the missing operand... :)