/
intro.pod6
66 lines (53 loc) 路 2.92 KB
/
intro.pod6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
=begin pod
=TITLE Brief introduction
=SUBTITLE Using Perl聽6 official documentation
Documenting a large language like Perl聽6 has to balance several contradictory
goals, such as being brief whilst being comprehensive, catering to professional
developers with wide experience whilst also being accessible to newcomers to the
language.
For a quick hands-on introduction, there is a short
L<C<annotated programming example>|/language/101-basics>.
For programmers with experience in other languages, there are a number of
B<Migration> guides that compare and contrast the features of Perl6 with other
languages.
A number of B<Tutorials> cover several areas in which Perl6 is particularly
innovative. The section headers should help navigate the remaining documents.
There are a number of L<C<useful resources>|https://perl6.org/resources> listed
elsewhere on the perl6.org site. These include articles, books, slide
presentations, and videos.
It has been found that newcommers to Perl聽6 often ask questions that indicate
assumptions carried over from other programming paradigms. It is suggested that
the following sections in the C<Fundamental topics> section should be reviewed
first.
=begin item
L<C<Signatures>|/type/Signature> - each routine, which includes subroutines and
methods, has a signature. Understanding the information given in the signature
of a C<sub> or C<method> provides a quick way to grasp the operation and effect
of the routine.
=end item
=begin item
L<C<Containers>|/language/containers> - variables, which are like the nouns of
a computer language, are containers in which information is stored. The first
letter in the formal name of a container, such as the '$' of $my-variable, or
'@' of @an-array-of-things, or '%' of %the-scores-in-the-competition, conveys
information about the container. However, Perl6 is more abstract than other
languages about what can be stored in a container. So, for example, a $scalar
container can contain an object that is in fact an array.
=end item
=begin item
L<C<Classes and Roles>|/language/classtut> - Perl聽6 is fundamentally based on
objects, which are described in terms of classes and roles. Perl聽6, unlike some
languages, does not B<impose> object-oriented programming practices, and useful
programs can be written as if Perl聽6 was purely procedural in nature. However,
complex software, such as the Rakudo compiler of Perl聽6, is made much simpler
by writing in object-oriented idioms, which is why the Perl聽6 documentation is
more easily understood by reviewing what a class is and what a role is. Without
understanding about Classes and Roles, it would be difficult to understand
Types, to which a whole section of the documentation is devoted.
=end item
=begin item
L<C<Traps to Avoid>|/language/traps> - Several common assumptions lead to code
that does not work as the programmer intended. This section identifies some. It
is worth reviewing when something doesn't quite work out.
=end item
=end pod