Skip to content

Commit 9e90d1d

Browse files
committed
more FAQ tweaks
1 parent 1ce53ae commit 9e90d1d

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

doc/Language/faq.pod

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,7 @@ C<regex> declares a plain regex without any implied modifiers.
400400
C<die> throws an exception.
401401
402402
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.)
405404
406405
A C<Failure> is an "unthrown" or "lazy" exception. It is an object that
407406
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.
414413
415414
Perl 5 has the C<wantarray> function that tells you whether it is called in
416415
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.
419418
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
421420
422421
multi w(Int $x) { say 'Int' }
423422
multi w(Str $x) { say 'Str' }
@@ -444,10 +443,8 @@ decision. As they (both the language and the implementations) evolve, they
444443
grow steadily more usable. Depending on your demands on a programming
445444
language, Perl 6 and its compilers might or might not be ready for you.
446445
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.
451448
452449
=head2 Why should I learn Perl 6? What's so great about it?
453450
@@ -473,8 +470,7 @@ Unlike most languages, it offers
473470
474471
=item optional type annotations
475472
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
478474
479475
=item lexical imports
480476
@@ -516,16 +512,15 @@ features.
516512
517513
That depends on what you are doing. Rakudo has been developed with the
518514
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.
529524
530525
The following crude benchmarks, with all the usual caveats about such things,
531526
can show Perl 6 can be faster than Perl 5 for some similar common tasks if

0 commit comments

Comments
 (0)