develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34067 - trunk/docs/book

From:
Whiteknight
Date:
December 18, 2008 08:11
Subject:
[svn:parrot] r34067 - trunk/docs/book
Message ID:
20081218161118.D7DA1CBA12@x12.develooper.com
Author: Whiteknight
Date: Thu Dec 18 08:11:18 2008
New Revision: 34067

Modified:
   trunk/docs/book/ch03_pir_basics.pod

Log:
[Book] a few small updates to chapter 3

Modified: trunk/docs/book/ch03_pir_basics.pod
==============================================================================
--- trunk/docs/book/ch03_pir_basics.pod	(original)
+++ trunk/docs/book/ch03_pir_basics.pod	Thu Dec 18 08:11:18 2008
@@ -112,8 +112,6 @@
 a good idea to be mindful of the things that might impact performance
 anyway.
 
-
-
 =head2 Constants
 
 X<constants (PIR)>
@@ -354,9 +352,9 @@
   .end
 
 The output now is "Polly want a cracker?". Execution in PIR starts
-at the main function and continues until the end of that function only.
-If you want to do more stuff if your program, you will need to call
-other functions explicitly.
+at the C<:main> function and continues until the end of that function
+only. If you want to do more stuff if your program, you will need to
+call other functions explicitly.
 
 A<CHP-04>Chapter 4 goes into much more detail about compilation units
 and their uses.
@@ -372,11 +370,13 @@
 remember that PIR is a thin overlay on the assembly language of a
 virtual processor. High level control structures are invariably linked
 to the language in which they are used, so any attempt by Parrot to
-provide these structures would work for some languages but not by
-others. The only way to make sure all languages and their control
-structures can be equally accomodated is to simply give them the most
-simple and fundamental building blocks to work with. Language
-agnosticism is an important design goal in Parrot.
+provide these structures would work well for some languages but would
+require all sorts of messy translation in others. The only way to make
+sure all languages and their control structures can be equally
+accomodated is to simply give them the most simple and fundamental
+building blocks to work with. Language agnosticism is an important
+design goal in Parrot, and creates a very flexible and powerful
+development environment for our language developers.
 
 X<goto instruction (PIR)>
 The most basic branching instruction is the unconditional branch:
@@ -482,12 +482,15 @@
 This example tests the counter C<$I1> at the start of the loop. At the
 end of the loop, it unconditionally branches back to the start of the
 loop and tests the condition again. The loop ends when the counter
-C<$I1> reaches 0 and the C<if> branches to the C<LAST> label.  If the
+C<$I1> reaches 0 and the C<if> branches to the C<LAST> label. If the
 counter isn't a positive number before the loop, the loop never
 executes.
 
 Any high-level flow control construct can be built from conditional
-and unconditional branches.
+and unconditional branches, because this is the way almost all computer
+hardware operates at the lowest-level, so all modern programming
+languages use branching constructs to implement their most complex
+flow control devices.
 
 Fortunately, libraries of macros have been developed that can implement
 more familiar syntax for many of these control structures. We will discuss



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About