Computer SciencePharo by Example 5.0
Not rated yetRate this bookPharo by Example 5.0 introduces the Pharo language, live programming environment and tools to readers with prior programming experience. Stéphane Ducasse, Dimitris Chloupis, Nicolai Hess and Dmitri Zagidulin use examples to move from basic interaction into intermediate topics.
FreeAbout this book
The preface presents Pharo as a language, environment, toolset, library ecosystem and community. This revision updates earlier material for Pharo 5.0 and is dated September 29, 2018 on the hosted PDF. It assumes familiarity with programming and is not designed as a first introduction to coding. Examples emphasise the technology and its common practices, while companion volumes address deeper internals and web development. The historical version context matters when following its examples or reading statements about releases that were current when the text was written.
The attached edition contains 376 PDF pages, including front matter. Cover: source edition title page rendered from the PDF. The textbook and its original notices are retained; Academic Master’s study material is separate from the source text.
Book summary
Pharo by Example 5.0 introduces a live object-oriented programming environment through tools, syntax, an application, testing, libraries, and reflection. This guide follows the Pharo 5.0 revision dated September 29, 2018, including fifteen chapters. Examples should be understood in that edition’s environment, with adaptations recorded separately. The main learning method is to inspect objects, send messages, observe behavior, and develop a precise account of what happened.
Chapter-by-chapter summaries
Chapter 1: A Quick Tour
The tour introduces installation, image components, launching, menus, playgrounds, transcripts, browsing, and method definition. Distinguish saved image state from source that can be shared and reloaded. Use the tools to investigate a small expression rather than treat the environment as a conventional text editor with an added run button.
Chapter 2: A First Application
The Lights Out game develops classes, methods, object inspection, packages, and a functioning interaction. Follow how a cell’s responsibilities connect with the game’s state and behavior. Build in small increments and inspect intermediate objects. The example makes design visible through collaboration rather than a single long procedure.
Chapter 3: Syntax in a Nutshell
Literals, variables, message sends, methods, blocks, conditionals, loops, primitives, and pragmas form a compact syntax. The language’s simplicity depends on message-based behavior rather than many special control constructs. Parse small expressions explicitly and distinguish syntax from the behavior implemented by a receiver’s methods.
Chapter 4: Understanding Message Syntax
Unary, binary, and keyword messages follow defined composition rules. Cascades and expression sequences introduce further distinctions. Determine the receiver and selector before predicting the result. Familiar mathematical precedence should not be imported where Pharo’s message rules govern evaluation. Parentheses can make the intended structure explicit.
Chapter 5: The Object Model
Objects, instances, classes, inheritance, instance-side and class-side behavior, and method lookup explain how messages produce behavior. A class is also an object, so its own behavior must be distinguished from that of its instances. Trace lookup through a small hierarchy and account for state ownership rather than simply memorize definitions.
Chapter 6: Environment Tools
The browser, inspector, debugger, process browser, and search facilities support different kinds of questions. Inspecting a runtime object differs from reading its class definition. Use the debugger to explain an actual execution state and the browser to understand the methods involved. Tool fluency means selecting an instrument that can answer the uncertainty at hand.
Chapter 7: Sharing Code and Source Control
Packages organize classes and methods for development and exchange. Source-control tools preserve versions, while file and recovery facilities support work within the image. Keep shareable code distinct from incidental session state. Reconstruct a small package in a clean environment to test whether your saved material captures what another developer needs.
Chapter 8: SUnit
SUnit organizes tests, assertions, setup, execution, and failure reporting. A useful test expresses expected behavior and helps locate a regression. Distinguish a failed assertion from an error that prevents the test from reaching its assertion. Follow the source examples and explain what each case establishes, including the boundaries it does not test.
Chapter 9: Basic Classes
Object, numbers, characters, strings, Booleans, and collections supply the working vocabulary of the environment. Choose representations according to required behavior rather than surface resemblance. Compare identity and equality, and use collection protocols to express operations clearly. A small experiment with inspection can reveal a distinction hidden by a familiar printed result.
Chapter 10: Streams
Streams provide a sequential interface for reading or writing data. The abstraction concerns how elements are accessed, not only a particular storage medium. Trace position and end conditions in a small example. Distinguish the collection containing information from the stream used to process it, especially when a computation changes where the next operation occurs.
Chapter 11: Morphic
Morphic introduces interactive graphical objects and the relationships involved in their display and behavior. Examine ownership, geometry, and responses to interaction rather than view a morph as only a static picture. Build a small example and explain which object handles each event. Keep the application’s meaning distinct from incidental screen placement.
Chapter 12: Seaside by Example
Seaside connects object-oriented components with a Web application. The example develops rendering and interaction while illustrating a different execution context from a desktop application. Follow how state and callbacks relate to the interface. The chapter describes the edition’s framework and deployment assumptions; later environments require their own compatibility checks.
Chapter 13: Reflection
Reflection lets programs inspect or work with aspects of their own structure and execution. The environment’s exploratory power is grounded in these mechanisms. Identify what is represented and what operation changes behavior rather than merely reads information. Use small controlled examples so a reflective operation has an explainable effect rather than an opaque global consequence.
Chapter 14: Regular Expressions
Patterns support recognition, search, and rewriting of strings. Compare complete matching with locating a portion of text, and test both accepted and rejected examples. A compact pattern should still have a clear account of what it permits. More complex structure may require a parser rather than a steadily growing expression.
Chapter 15: Classes and Metaclasses
The final chapter returns to the object model at a deeper level. Class-side behavior and metaclass relationships explain how classes participate in the same message-based world as other objects. Draw the instance-of and inheritance relationships separately. This avoids confusing two different links and helps integrate earlier observations from the browser and runtime experiments.
Study instructions
- Record the image and package versions used and keep adaptations separate from the 2018 examples.
- Predict, evaluate, and inspect a short expression from each chapter.
- Trace receiver, selector, arguments, lookup, and state changes when an expression is unclear.
- Rebuild the example application incrementally with focused behavior checks.
- Save a shareable package and verify that it loads into a separate image.
- Write a final explanation linking tool observations with the underlying object model.
Questions for reflection
- What is saved in an image that is not yet captured by a source package?
- How do class-side and instance-side behavior differ?
- Which runtime observation would test your explanation of a message send?
Sources and coverage
This original study guide follows the complete linked source edition and all of its substantive chapters or named teaching sections. It condenses their main ideas and relationships; the study tasks are guidance for reading alongside the complete resource. It does not reproduce the source exercises or answer key. Book source; Complete source PDF.
Check this edition’s source and licence before reusing its files or content. A library listing does not grant additional rights.
Read our Library Access & Copyright policyLive environment
Recognise the ecosystem described in the preface.
Audience preparation
Distinguish learning Pharo from learning to program.
Example-based study
Connect experimentation with understanding.
Software context
Interpret the text within Pharo 5.0.
Reader ratings & reviews
Share your thoughts
Your review helps other students choose the right resources.









