Perl 6
Perl 6 Language Design Tablet: Revision 35
"Overview"[Perl 6 Tablets] - _Chapter:_ "0:History"[Perl 6 History Tablet], *"1:Design"[Perl 6 Language Design Tablet]*, "2:Basics"[Perl 6 Basics Tablet], "3:Var"[Perl 6 Variable Tablet], "4:Op"[Perl 6 Operator Tablet], "5:IO"[Perl 6 IO Tablet], "6:{}"[Perl 6 Block Tablet], "7:Sub"[Perl 6 Subroutine Tablet], "8:OOP"[Perl 6 OOP Tablet], "9:Rx"[Perl 6 Regex Tablet], "10:Meta"[Perl 6 Meta Tablet]
"Intro"[Perl 6 Intro Tablet] - _Appendices:_ "A:Index"[Perl 6 Index Tablet], "B:Tables"[Perl 6 Lookup Tablet], "C:Cook"[Perl 6 Cookbook Tablet], "D:Delta"[Perl 6 Delta Tablet], "E:Best of"[Best Of Perl 6 Tablet], "F:Links"[Perl 6 Links Tablet]

----

{toc: }

"Larry Wall"<http://www.wall.org/~larry/>_: You should not take this picture to mean that linguistics is the opposite of common sense. But ehm, there are many computer scientists, who have complained that it should be more like engineering and less like an art. And I disagree. But thats oukay._

^^ Main Goal

Enjoy Life and *enjoy the freedom of expressing yourself*. Which means: support you as much as possible and not to force you in any way. Perl 6 likes to be even better than Perl 5, your humble servant for translating your thoughts into binary code (if possible).

^^ Strategy

Every style and level of expertise has to be supported and even more difficult: all of them have to play together well. The default often imitates a natural language (i.e. english). Strategies and concepts for this are coined in several often repeated terms.

^^ Terms

^^^ TIMTOWTDI

The everlasting slogan: "There is more then one way to do it.", meaning your way is valid too. Only be aware of logical consequences.

^^^ Visual Metaphor

People like to overview their code like a picture at the first glance. Therefore names and operators should be distinctive from each other but similar are allowed to look similar, different definitively not. Larry likes to add: weird thinks should also look weird. And sometimes even character can be Ideogram like the Z-Mataoperator, which shows how he works (first left then right then next left ....).

^^^ Topicalizer

This has also to do with natural attention flow. If a topic or first word of a sentence sets an understandable context for the following, the meaning is building up word for word and is much easier to grasp, than if the last word of a block resolves its whole meaning (like regex modifier in Perl 5 did). Especially "for"{link: [Perl 6 Perl 6 Block Tablet] for} and "given"{link: [Perl 6 Perl 6 Block Tablet] given} are called topicalizer, because they set $_, the context variable.

^^^ Context sensitive

The same term or symbol might do different things in different contexts, although we done our very best that it always represents the same general idea. Maybe the best example is the "* aka Whatever"[witch_star]. But every context is it's own world, optimized to solve the problems of that world.

^^^ Maximum reusage

Not only syntax is reused, to minimize the stuff you have to remember, but also concepts are reused wherever possible. Pairs are e.g. used to build hashes or named parameters in routines calls. There are plenty more examples. Maybe the biggest one: the regex engine that parses your code is the same as you use in your program.

^^^ No special rules

Most of the special rules that plagued Perl 5 are gone or generalized.

^^^ One pass parsing

Not only for people but also for software parser Perl 6 is much easier to understand. The language is designed to be understood by machines in one read, dividing the source in smaller and smaller units. As a nice side effect: syntax errors can only damage the understanding of small units.

^^^ Keep easy things easy and hard things possible

Beside TIMTOWTDI, the other ancient slogan is "Keep easy things easy and hard things possible." Even if nearly every cool idea is crammed into Perl 6, we don't lose track of the basics and make them as accessible and free of artificial prerequisites as possible, e.g. printing a variable as a line without quoting and "\n" (say), or reading a file without a file handle (with slurp and lines). Rule of thumb: if you can think of an concept as trivial, then it should be. And if you on the other hand can think of a computable solution, it should be at last doable in Perl (no artificial walls).

^^^ Huffman coding

That's a refinement of the last rule. It means that all the common, often used things have short straightforward names. The more verbose indicate less used, harder to grasp concepts or things that overwrite the default rules ("weird things should look weird"). It also implies that the defaults are leaning toward what a beginner/non-perl 5-programmer might expect ("hide the fancy stuff").

^^^ Water bed theory of linguistic complexity

The underlying philosophy of the two terms before. All Perl words should reflect logical units which you can combine freely. Making it more complicated than necessary is obviously not aspiring. But oversimplification will create artificial complexity somewhere else. Like a water bed where you can push your hand in somewhere but the water will go up in another spot.

^^^ All your paradigms are belong to us

We learn/take/adapt from every source possible to offer the best of all breeds. And you should be able to keep your style when switching to Perl. Some of the paradigmes are structured, object oriented, aspect oriented, functional, design by contract, declarative and logical.

^^^ Buzzword compliant

This term is an extension to the last one. Not only every programming paradigm but also every technique or neat trick loudly marketed out there as "must have" "in the {{[%DATE%]}}", should be available in Perl 6 (or at least be possible) as long there is productive value in it. "named parameters", "lvalue subroutines", "parametizable subclasses" or "hygienic macros" are just a few.

^^^ Second system syndrome

An addon to the previous that should tell you: We are very aware that many ambitious software projects that were built from scratch failed. Especially those who aimed to be the "even better in all terms" successors of already successful creations. In fact, this happened so often that the term second system syndrome was coined. We chose this path for Perl 6 nevertheless, because we believe its the only way to get a significantly better language. (Gradual improvements are flowing into Perl 5 all the time and are sometimes inspired from Perl 6.) That's why the unofficial motto of Perl 6 is "Second system syndrome done right".

^^ Trends

As a consequence of these principles, the "following trends"{link: [Perl 6 Delta Tablet] Trends} are observable.

^^ Design Process

The initial start where 361 RFC (request for comment) by people from all over the world. Larry Wall sorted and commented them in several documents known as apocalypses (revelations). Damian Conway wrote to apocalypse an exegesis (explanation), that showed Larrys ideas in details. They are all historic documents that not have changed since, because they were much harder to maintain than the synopsis (abstract or comparison (with Perl 5)). They become with the test suite the official specification of Perl 6. More details on that can be found in the "history section"[Perl 6 History Tablet].

The synopses are continually edited because the more we think about the syntax and semantics, the more detailed the picture gets. The other important input comes from the implementors. They point to cases that worked only in theory and important corner cases not thought about before. This mutual influence of specification and implementation we call whirlpool model of software development, which is an intended pun to the well known waterfall model.

Design changes are usually discussed in the p6l mailing list and the perl6 channel on freenode.

----

"Overview"[Perl 6 Tablets] - _Chapter:_ "0:History"[Perl 6 History Tablet], *"1:Design"[Perl 6 Language Design Tablet]*, "2:Basics"[Perl 6 Basics Tablet], "3:Var"[Perl 6 Variable Tablet], "4:Op"[Perl 6 Operator Tablet], "5:IO"[Perl 6 IO Tablet], "6:{}"[Perl 6 Block Tablet], "7:Sub"[Perl 6 Subroutine Tablet], "8:OOP"[Perl 6 OOP Tablet], "9:Rx"[Perl 6 Regex Tablet], "10:Meta"[Perl 6 Meta Tablet]
"Intro"[Perl 6 Intro Tablet] - _Appendices:_ "A:Index"[Perl 6 Index Tablet], "B:Tables"[Perl 6 Lookup Tablet], "C:Cook"[Perl 6 Cookbook Tablet], "D:Delta"[Perl 6 Delta Tablet], "E:Best of"[Best Of Perl 6 Tablet], "F:Links"[Perl 6 Links Tablet]

----


Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: