4 ms·
It only appears superficial because you have only looked at the surface of it. Perl6 brings together features from many languages, but makes them feel as if th
by b2gills 7y ago
It only appears superficial because you have only looked at the surface of it.
Perl6 brings together features from many languages, but makes them feel as if they have always belonged together.
Imagine writing Haskell and C code in the same line. If Perl6 had just copied the syntax of the originators of those features verbatim, it would feel very disjointed. It instead feels very natural and fluid.
gather loop ( my Int $i = 0 ; ; $i += 2 ) { take $i }
The above line is a generator for an infinite sequence of even numbers, but uses the C-style `for` loop to do it.
---
When major features get brought into Perl6 they are rarely copied exactly. That applies both to the syntax and the functionality of the feature. If the feature doesn't compose with other language features, or doesn't mesh syntactically, it will be redesigned until it does.
(We don't want non-Perl6-ish features.)
When I was new to Perl6 I would often try to combine features together to try and break the syntax/compiler/runtime. Eventually I got tired of that because it almost always worked the first time exactly how I would expect it to.
(A wizard will eventually see magical things as being mundane because he sees them day-in and day-out.)