Categories
Posts in this category
- Introduction
- Strings, Arrays, Hashes;
- Types
- Basic Control Structures
- Subroutines and Signatures
- Objects and Classes
- Contexts
- Regexes (also called "rules")
- Junctions
- Comparing and Matching
- Containers and Values
- Where we are now - an update
- Changes to Perl 5 Operators
- Laziness
- Custom Operators
- The MAIN sub
- Twigils
- Enums
- Unicode
- Scoping
- Regexes strike back
- A grammar for (pseudo) XML
- Subset Types
- The State of the implementations
- Quoting and Parsing
- The Reduction Meta Operator
- The Cross Meta Operator
- Exceptions and control exceptions
Sun, 21 Sep 2008
Introduction
Permanent link
NAME
"Perl 5 to 6" - Introduction
SYNOPSIS
Learn Perl 6 (if you already know Perl 5)
Learn to love Perl 6
Understand why
DESCRIPTION
Perl 6 is underdocumented. That's no surprise, because (apart from the specification) writing a compiler for Perl 6 seems to be much more urgent than writing documentation that targets the user.
Unfortunately that means that it's not easy to learn Perl 6, and that you have to have a profound interest in Perl 6 to actually find the motivation to learn it from the specification, IRC channels or from the test suite.
This project, which I'll preliminary call "Perl 5 to 6" (in lack of a better name) attempts to fill that gap with a series of short articles.
Each lesson has a rather limited topic, and tries to explain the two or three most important points with very short examples. It also tries to explain why things changed from Perl 5 to 6, and why this is important. I also hope that the knowledge you gain from reading these lessons is enough to basically understand the Synopsis, which are the canonical source of all Perl 6 wisdom.
To keep the reading easy, each lesson should not exceed 200 lines or 1000 words (but it's a soft limit).
Perhaps the lessons are too short to learn a programming language from them, but I hope that they draw an outline of the language design, which allows you to see its beauty without having to learn the language.
IT'S NOT
This is not a guide for converting Perl 5 to Perl 6 programs. It is also not a comprehensive list of differences. See http://svn.pugscode.org/pugs/docs/Perl6/Perl5/Differences.pod Perl6::Perl5::Differences instead if you're looking for something like that.
It is also not oriented on the current state of the implementations, but on the ideal language as specified.
ROADMAP
Already written or in preparation:
00 Intro
01 Strings, Arrays, Hashes
02 Types
03 Control structures
04 Subs and Signatures
05 Objects and Classes
06 Contexts
07 Rules
08 Junctions
09 Comparisons and Smartmatching
10 Containers and Binding
11 Basic Operators
12 Lazyness (-)
13 Custom Operators (-)
14 the MAIN sub
15 Twigils
16 Enums
17 Unicode (-)
18 Scoping
19 More Regexes
20 A Grammar for XML
21 Subset types
22 State of the Implementations
23 Quoting and Parsing (-)
24 Recude meta operator
25 Cross meta operator
26 Exceptions and control exceptions
(Things that are not or mostly not implemented in Rakudo are marked with (-))
Things that I want to write about, but which I don't know well enough yet:
Macros
Meta Object Programming
Concurrency
IO
Things that I want to mention somewhere, but don't know where
.perl method
I'll also update these lessons from time to time make sure they are not too outdated.
AUTHOR
Moritz Lenz, http://perlgeek.de/, moritz@faui2k3.org
Comments / Trackbacks:
Trackback URL:
/blog-en/perl-5-to-6/00-intro.trackback
Peter wrote
Great idea! I'm asking for good Unicode article. It's so important for me.It took me while to understand utf8 support in Perl5. Still I have to explain my coworkers how utf8 works. I don't want to do that when we switch to Perl6 someday!
Moritz wrote
Unicode
A Unicode article is in preparation. Don't worry, many Unicode troubles in Perl 5 stem from the fact that you don't have separate data types for binary and for text strings. In Perl 6 you have, so it's basically impossible to mix up these two unintentionally.
Write a comment
The comments on this blog post have been disabled; the comment form below will not work.