HOME

TheInfoList



OR:

Pharo is an
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
, cross-platform implementation of the classic
Smalltalk Smalltalk is an object-oriented, dynamically typed reflective programming language. It was designed and created in part for educational use, specifically for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by Alan Ka ...
-80 programming language and runtime. It's based on the
OpenSmalltalk Smalltalk is an object-oriented, dynamically typed reflective programming language. It was designed and created in part for educational use, specifically for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by Alan ...
virtual machine called Cog (VM), which evaluates a dynamic,
reflective Reflection is the change in direction of a wavefront at an interface between two different media so that the wavefront returns into the medium from which it originated. Common examples include the reflection of light, sound and water waves. The ' ...
, and
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pro ...
programming language with a syntax closely resembling Smalltalk-80. Pharo is shipped with a source code compiled into a ''system image'' that contains all software necessary to run Pharo system. Like the original Smalltalk-80, Pharo provides several
live programming Interactive programming is the procedure of writing parts of a program while it is already active. This focuses on the program text as the main interface for a running process, rather than an interactive application, where the program is design ...
features such as immediate object manipulation, live updates, and
just-in-time compilation In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is a way of executing computer code that involves compilation during execution of a program (at run time) rather than before execution. This may cons ...
. The image includes an IDE-like software to modify its components. Pharo was forked from
Squeak Squeak is an object-oriented, class-based, and reflective programming language. It was derived from Smalltalk-80 by a group that included some of Smalltalk-80's original developers, initially at Apple Computer, then at Walt Disney Imagineering, ...
v3.9 in March of 2008.


Overview

Pharo is a pure object-oriented dynamically typed and reflective language. The stated goal of Pharo is to revisit Smalltalk design and enhance it. The name Pharo comes from the French word "phare" () which means lighthouse. This is why the Pharo logo shows a drawing of a lighthouse inside the final letter ''O'' of the name.


Key features


Virtual machine

* Multiplatform virtual machine with
JIT Jit (also known as jiti, jit-jive and the Harare beat) is a style of popular Zimbabwean dance music. It features a swift rhythm played on drums and accompanied by a guitar. Jit evolved out many diverse influences, including domestic chimurenga, ...
, combined generational
garbage collector A waste collector, also known as a garbageman, garbage collector, trashman (in the US), binman or (rarely) dustman (in the UK), is a person employed by a public or private enterprise to collect and dispose of municipal solid waste (refuse) and r ...
, ephemerons, forwarders * Fast object enumeration * Easy
call stack In computer science, a call stack is a stack data structure that stores information about the active subroutines of a computer program. This kind of stack is also known as an execution stack, program stack, control stack, run-time stack, or ma ...
manipulation * AST metalinks * Relatively low memory consumption * Customizable compiler * Optional complete object memory persistence * Resumable exceptions * Fast object serialization


Built-in software

* Optional fusion of developed program and
development environment In software deployment, an environment or tier is a computer system or set of systems in which a computer program or software component is deployed and executed. In simple cases, such as developing and immediately executing a program on the same m ...
*Live object inspection


Language features

* Simple syntax * Object-oriented programming * Immediate object identity swapping * Dynamic inheritance * Objects as methods * Optional
Green threads In computer programming, a green thread is a thread that is scheduled by a runtime library or virtual machine (VM) instead of natively by the underlying operating system (OS). Green threads emulate multithreaded environments without relying on an ...
* Customizable metaclasses * Easy to use proxy objects


Relation to Smalltalk

Pharo is based on general concepts of Smalltalk but seeks to improve on them so does not limit itself to them. The basic syntax of the language has a close resemblance to Smalltalk. However, the way classes are defined in Pharo differs from other Smalltalk dialects.


Language syntax

The Pharo syntax is based on Smalltalk-80 language syntax with several extensions. Some of these are common among modern Smalltalk dialects. * literals for dynamic arrays. The expressions that specify the array content are evaluated in time of the program execution * literals for byte arrays that can be composed only of integer numbers in the range from 0 to 255 # 2 3 4/syntaxhighlight> * literals for scaled decimals, a representation of fixed point decimal numbers able to accurately represent decimal fractions 3.14s2 * pragmas. In Smalltalk-80 the pragmas are used only for primitive methods. In Pharo they are fully capable method annotations * two double quotes inside a comment are interpreted as a single double quotes character that is part of the content of the comment The Pharo language syntax is supposed to be very simple and minimalistic. The basic language elements are often presented on a single postcard. The grammar is classified as LL(1). The language grammar does not specify directly how the code should be stored in files. Pharo use
Tonel
as the preferred code serialization format.


History

Pharo emerged as a fork of
Squeak Squeak is an object-oriented, class-based, and reflective programming language. It was derived from Smalltalk-80 by a group that included some of Smalltalk-80's original developers, initially at Apple Computer, then at Walt Disney Imagineering, ...
, an open-source Smalltalk environment created by the Smalltalk-80 team (
Dan Ingalls Daniel Henry Holmes Ingalls Jr. (born 1944) is a pioneer of object-oriented computer programming and the principal architect, designer and implementer of five generations of Smalltalk environments. He designed the bytecoded virtual machine that ...
and
Alan Kay Alan Curtis Kay (born May 17, 1940) published by the Association for Computing Machinery 2012 is an American computer scientist best known for his pioneering work on object-oriented programming and windowing graphical user interface (GUI) d ...
). Pharo was created by S. Ducass

and M. Denker in March 2008. It focuses on modern software engineering and development techniques. Pharo is supported by the Pharo consortium (for legal entities

and the Pharo association for physical person


Use of Pharo


Companies and consultants

Some companies use Pharo for their development projects. In particular, they use: * Seaside (software), Seaside for dynamic web development * Zinc for server architectures *
Moose The moose (in North America) or elk (in Eurasia) (''Alces alces'') is a member of the New World deer subfamily and is the only species in the genus ''Alces''. It is the largest and heaviest extant species in the deer family. Most adult mal ...
to analyse data and software from all programming languages * Graphic libraries for evolved user interfaces * Roassal to visualize data The Pharo consortium was created for companies wishing to support the Pharo project. The Pharo association was created in 2011 for users wishing to support the project.


Performance and virtual machine (VM)

Pharo relies on a virtual machine that is written almost entirely in Smalltalk itself. Beginning in 2008, a new virtual machine (Cog) for Squeak, Pharo and
Newspeak Newspeak is the fictional language of Oceania, a totalitarian superstate that is the setting of the 1949 dystopian novel ''Nineteen Eighty-Four'', by George Orwell. In the novel, the Party created Newspeak to meet the ideological requirements ...
has been developed that has a level of performance close to the fastest Smalltalk virtual machine. In 2014/2015 the VM community is working on Spur, a new Memory Manager for Cog that should again increase performance and provide better 64-bit VM support.


See also

*
Amber Smalltalk Amber Smalltalk, formerly named Jtalk, is an implementation of the programming language Smalltalk-80, that runs on the JavaScript runtime of a web browser. It is designed to enable client-side development using Smalltalk.
*
GNU Smalltalk GNU Smalltalk is an implementation of the Smalltalk programming language by the GNU Project. The implementation, unlike other Smalltalk environments, uses text files for program input and interprets the contents as Smalltalk code. In this way, ...
*
Squeak Squeak is an object-oriented, class-based, and reflective programming language. It was derived from Smalltalk-80 by a group that included some of Smalltalk-80's original developers, initially at Apple Computer, then at Walt Disney Imagineering, ...
*
VisualWorks VisualWorks is a cross-platform implementation of the Smalltalk language. It is implemented as a development system based on "images", which are dynamic collections of software objects, each contained in a system image. The lineage of VisualWorks ...


References


External links

* {{Smalltalk programming language Class-based programming languages Dynamically typed programming languages Smalltalk programming language family Software using the MIT license