forked from SquareBracketAssociates/UpdatedPharoByExample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPreface.pillar
126 lines (91 loc) · 6.79 KB
/
Preface.pillar
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
!Preface
!!What is Pharo?
Pharo is a modern, open-source, dynamically-typed language
inspired by the Smalltalk programming language and environment. Pharo strives
to offer a lean, open platform for professional software development, as well as
a robust and stable platform for research and development into dynamic languages
and environments. Pharo serves as the reference implementation for the Seaside
web development framework available at *http://www.seaside.st*.
Pharo core contains only code that has been contributed under the MIT license.
The Pharo project started in March 2008, and the first 1.0 beta version was
released on July 31, 2009. The current version is Pharo 4.0, released in April
2015. Pharo 5.0 is in alpha development.
Pharo is highly portable. Its virtual machine is written entirely in
a subset of Smalltalk, making it easy to simulate, debug, analyze, and change
from within Pharo itself. Pharo is the vehicle for a
wide range of innovative projects, from multimedia applications and educational
platforms to commercial web development environments.
There is an important principle behind Pharo. Pharo should not just be a copy of
the past, but reinvent Smalltalk. However we realize that Big Bang style approaches
rarely succeed. Pharo instead favors evolutionary and incremental changes.
Rather than leaping for the final perfect solution in one big step,
a multitude of small changes keeps even the bleeding edge relatively stable
while experimenting with important new features and libraries.
This facilitates rapid feedback and contributions from the community,
on which Pharo depends for its success. You can make impact on Pharo.
!!Who should read this book?
The previous revision of this book was based on Pharo 1.4.
This revision has been liberally updated to align with Pharo 4.0.
Various aspects of Pharo are presented, starting with
the basics then proceeding to intermediate topics.
Advanced topics are presented in "Deep into Pharo", a book on the internals of Pharo
that is freely available at *http://www.deepintopharo.org*
This book will not teach you how to program. The reader should have some
familiarity with programming languages. Some background with object-oriented
programming would also be helpful.
This book will introduce the Pharo programming environment, the language and the
associated tools. You will be exposed to common idioms and practices, but the
focus is on the technology, not on object-oriented design. Wherever possible,
we will show you lots of examples. We have been inspired by Alec Sharp’s
excellent book on Smalltalk (Alec Sharp,
*Smalltalk by Example>Http://stephane.ducasse.free.fr/FreeBooks/ByExample*, McGraw-Hill,
1997).
There are numerous other
*books on Smalltalk freely available on the web>http://stephane.ducasse.free.fr/FreeBooks.html* but none of these focuses specifically on Pharo.
!!A word of advice
Do not be frustrated by parts of Pharo that you do not immediately understand.
You do not have to know everything! Alan Knight expresses this as follows:
{{{latex:\begin{quote} }}}{{{html:<blockquote>}}}
''Try not to care''. Beginning Smalltalk programmers often have trouble because they think they need to understand all the details of how a thing works before they can use it. This means it takes quite a while before they can master Transcript show: 'Hello World'. One of the great leaps in OO is to be able to answer the question “How does this work?” with "I don't care".
{{{latex:\end{quote} }}}{{{html:</blockquote>}}}
!!An open book
This book is an open book in the following senses:
-The content of this book is released under the Creative Commons Attribution-ShareAlike (by-sa) license. In short, you are allowed to freely share and adapt this book, as long as you respect the conditions of the license available at the following URL *http://creativecommons.org/licenses/by-sa/3.0/>http://creativecommons.org/licenses/by-sa/3.0/*.
-This book just describes the core of Pharo. We encourage others to contribute chapters on the parts of Pharo that we have not described. If you would like to participate in this effort, please contact us. We would like to see more books around Pharo!
-It also possible to contribute directly to this book via Github. Just follow the instructions there and ask any question on the mailing list. You can find the Github repo at *https://github.com/SquareBracketAssociates/UpdatedPharoByExample>https://github.com/SquareBracketAssociates/UpdatedPharoByExample*
!!The Pharo community
The Pharo community is friendly and active. Here is a short list of resources
that you may find useful:
- *http://www.pharo.org>http://www.pharo.org* is the main web site of Pharo.
- On IRC, you can find us on the freenode.net server, channel "pharo".
- You can also ask questions on Stack Overflow, using the tags *pharo>http://stackoverflow.com/questions/tagged/pharo* and *smalltalk>http://stackoverflow.com/questions/tagged/smalltalk*.
- SmalltalkHub (*http://www.smalltalkhub.com/>http://www.smalltalkhub.com/*) is the equivalent of SourceForge/Github for Pharo projects. Many extra packages and projects for Pharo live there.
!!Examples and exercises
We have tried to provide as many examples as possible. In particular, there are
many examples that show a fragment of code which can be evaluated. We use the
symbol ==-->== to indicate the result you obtain when you
select an expression and from its context menu choose ""print it"":
[[[label=scr:script1|caption=Small example|language=Smalltalk
3 + 4
--> 7 "if you select 3+4 and 'print it', you will see 7"
]]]
In case you want to play with these code snippets in Pharo, you can download a
plain text file with all the example code from the Resources sidebar of the book's web site:
*http://www.pharoByExample.org>http://www.pharoByExample.org*.
@@todo TODO: When book is finished, confirm this code snippet file is synchronised.
!!Acknowledgments
We would first like to thank Alan Kay, Dan Ingalls and their team for making
Squeak, an amazing Smalltalk development environment, that became the
open-source project from which Pharo took roots.
We would also like to thank Hilaire Fernandes and Serge Stinckwich who allowed
us to translate parts of their columns on Smalltalk, and Damien Cassou for
contributing the chapter on Streams. We especially thank Alexandre Bergel, Orla
Greevy, Fabrizio Perin, Lukas Renggli, Jorge Ressia and Erwann Wernli for their
detailed reviews.
We thank the University of Bern, Switzerland, for graciously supporting this
open-source project and for hosting the web site of this book.
We also thank the Pharo community for their enthusiastic support of this book
project, as well as for all the translations of the first edition of "Pharo by
Example".
Finally we want to thank Inria for its steady and important financial support,
and the RMoD team members for the constant energy pushing Pharo forward.