@@ -400,8 +400,7 @@ C<regex> declares a plain regex without any implied modifiers.
400
400
C < die > throws an exception.
401
401
402
402
C < fail > returns a C < Failure > object. (If the caller has declared C < use fatal; >
403
- in the calling lexical scope, C < fail > instead throws an exception
404
- instead of returning.)
403
+ in the calling lexical scope, C < fail > throws an exception instead of returning.)
405
404
406
405
A C < Failure > is an "unthrown" or "lazy" exception. It is an object that
407
406
contains the exception, and throws the exception if you try to use the C < Failure >
@@ -414,10 +413,10 @@ the exception with the C<exception> method.
414
413
415
414
Perl 5 has the C < wantarray > function that tells you whether it is called in
416
415
void, scalar or list context. Perl 6 has no equivalent construct,
417
- because context does not flow inwards, i.e. a routine cannot know which
418
- context it is called in.
416
+ because context does not flow inwards, i.e. a routine would need time travel to know which
417
+ context it is called in because context is lazy, known only when the results are used later .
419
418
420
- One reason is that Perl 6 has multi dispatch, and in a code example like
419
+ For example, Perl 6 has multiple dispatch, so in a code example like
421
420
422
421
multi w(Int $x) { say 'Int' }
423
422
multi w(Str $x) { say 'Str' }
@@ -444,10 +443,8 @@ decision. As they (both the language and the implementations) evolve, they
444
443
grow steadily more usable. Depending on your demands on a programming
445
444
language, Perl 6 and its compilers might or might not be ready for you.
446
445
447
- Please see the L < feature comparison
448
- matrix|http://perl6.org/compilers/features > for an overview of implemented
449
- features.
450
-
446
+ That said, version 6c (Christmas 2015) is the first official release of Perl 6
447
+ as a language, along with a validation suite and a compiler that passes it.
451
448
452
449
= head2 Why should I learn Perl 6? What's so great about it?
453
450
@@ -473,8 +470,7 @@ Unlike most languages, it offers
473
470
474
471
= item optional type annotations
475
472
476
- = item powerful run-time multi dispatch for both subroutines and methods based on
477
- arity, types and additional code constraints
473
+ = item powerful run-time multi dispatch for both subroutines and methods based on arity, types and additional code constraints
478
474
479
475
= item lexical imports
480
476
@@ -516,16 +512,15 @@ features.
516
512
517
513
That depends on what you are doing. Rakudo has been developed with the
518
514
philosophy of "make it work right then make it work fast". It's fast for some
519
- things already but needs work on others.
520
-
521
- Perl 6 is mostly being worked on by volunteers but it's expected that Perl 6
522
- performance will improve in the near future since the MoarVM backend contains a
523
- modern Just In Time (JIT) compiler.
524
-
525
- Perl 5 programmers should be aware that Perl 6 comes with more built in in
526
- terms of object orientation and much else. Simple benchmarks will be misleading
527
- unless you include things like Moose, type checking modules etc. in your Perl 5
528
- script.
515
+ things already but needs work on others. After the Christmas 2015 release stabilizes
516
+ the definition of the language, we'll be spending much of our effort on optimizing in 2016.
517
+ Since Perl 6 provides lots of clues to the JIT that other dynamic languages don't, we think
518
+ we'll have a lot of headroom for performance improvements. Some things already
519
+ run faster than Perl 5.
520
+
521
+ Perl 5 programmers should be aware that Perl 6 comes with more built-in
522
+ functionality. Simple benchmarks will be misleading unless you include
523
+ things like Moose, type checking modules etc. in your Perl 5 script.
529
524
530
525
The following crude benchmarks, with all the usual caveats about such things,
531
526
can show Perl 6 can be faster than Perl 5 for some similar common tasks if
0 commit comments