Pharo
Developer | Pharo community |
---|---|
First appeared | 2008 |
Stable release | 6.1
/ July 24, 2017 |
Implementation language | Smalltalk |
OS | Windows, Linux, macOS, others |
License | MIT license, partially Apache License 2.0[1] |
Website | pharo |
Influenced by | |
Smalltalk (Squeak) |
Pharo is an open source dynamic and reflective language inspired from the programming language and environment Smalltalk. Pharo offers strong live programming features such as immediate object manipulation, live update, and hot recompilation. The live programming environment is at the heart of the system.
Introduction
Pharo is a pure object-oriented dynamically typed and reflective language. It was influenced by Smalltalk. The goal of Pharo is to revisit Smalltalk design and enhance it. Pharo syntax fits on a single postcard. The object model is simple: only objects. Methods are virtual public (dynamically looked up). Fields are protected (only visible from class and subclasses). There is single inheritance between classes. A class can also be composed of traits (a group of methods). Fields are first class entities (named slots).
A full MOOC is available to learn Pharo [1]. Several books are available on-line at [2].
An industrial consortium has been created to sustain the development of Pharo [3]. An association gathers Pharo enthusiasts [4].
Pharos is a Greek word (Φάρος) which means lighthouse. The Pharo logo shows a drawing of a lighthouse inside the final letter O of the name.
Key features
Pharo benefits from an elegant design that enables relatively simple implementation of many advanced programming techniques.
- optional fusion of developed program and development environment
- advanced run-time reflectivity
- pure object-oriented approach
- simple language syntax
- immediate objects identity swapping
- fast resumable exceptions
- live customizable objects inspection
- run-time classes and objects migration
- dynamic inheritance
- advanced fast multiplatform virtual machine with JIT, combined generational garbage collector, ephemerons, forwarders
- virtual machine written mostly in the language itself
- easy call stack manipulation
- continuations
- fast objects enumeration
- objects as methods
- traits
- optional Green threads
- AST metalinks
- first-class customizable instance variables
- customizable metaclasses
- relatively low memory consumption
- platform independent user interface
- customizable compiler
- optional complete object memory persistence
- integrated Git support
- fast objects serialization
- simple connection to native libraries
Relation to Smalltalk
Pharo is a standalone language. It is not supposed to be an implementation of Smalltalk-80 nor ANSI Smalltalk. Pharo is based on general concepts of Smalltalk but does not want to be limited by them. The basic syntax of the language shares most of the elements with Smalltalk, however, the Smalltalk syntax provides only a frame for construction of custom languages. So for example, the way how classes are defined in Pharo differs from other Smalltalk dialects although they use the same or very similar language grammar.
Language syntax
The Pharo syntax is based on Smalltalk-80 language syntax with several extensions. Some of them are common for most of the modern Smalltalk dialects.
- literals for dynamic arrays. The expressions that specify the array content are evaluated in time of the program execution
{1. 2. 1+2}
- literals for byte arrays that can be composed only of integer numbers in the range from 0 to 255
#[1 2 3 4]
- 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
<gtInspectorPresentationOrder: 30>
- 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 uses Tonel as the prefered code serialization format.
History
Pharo emerged as a fork of Squeak, an open source Smalltalk environment created by the Smalltalk-80 team (Dan Ingalls and Alan Kay). Pharo was created by S. Ducasse [5] and M. Denker in March 2008. It focuses on modern software engineering and development techniques.[citation needed] Pharo is supported by the Pharo consortium (for legal entities) [6] and the Pharo association for physical persons [7].
Version | Release date | Major features |
---|---|---|
March 16, 2008 [3] | Fork of Squeak environment | |
Pharo 1.0 | April 15, 2010 | real closures, EToys and MVC removed |
Pharo 1.1 | July 26, 2010 | Cog JIT VM, Settings framework |
Pharo 1.2 | March 29, 2011 | new Finder, Recent changes tool, improved Help, better themes |
Pharo 1.3 | August 2011 | Zinc, headless images |
Pharo 1.4 | April 2012[4] | Ring metamodel, better code simulator |
Pharo 2.0 | March 18, 2013.[5] | browser improvements, QA tools, Fuel serializer, better files API |
Pharo 3.0 | April 2014.[6] | new modular compiler (Opal) and debugger, continuations |
Pharo 4.0 | April 2015.[7] | GTools, slots |
Pharo 5.0 | May 2016. [8] | Spur VM, UFFI, improved reflectivity |
Pharo 6.0 | 6 June, 2017. [9] | 64-bit and Git support |
Pharo 6.1 | 24 July, 2017. [10] | improved Git support |
Pharo 7.0 | end of 2018 | bootstrapping, new code browser (Calypso), stateful traits |
Use of Pharo
Companies and consultants
Some companies use Pharo for their development projects.[11] In particular, they use:
- Seaside for dynamic web development[12]
- Zinc for server architectures[13]
- Moose[14] to analyse data and software from all programming languages
- Graphic libraries for evolved user interfaces
- Roassal to visualize data[15]
The Pharo consortium[16] was created for companies wishing to support the Pharo project. The Pharo association[17] was recently created 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 has been developed that has a level of performance close to the fastest Smalltalk virtual machine.[18] 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.[19]
See also
External links
References
- ^ Pharo license information
- ^ The Pharo board
- ^ "Pharo got 10 years". Pharo-project.org. Retrieved May 31, 2018.
- ^ "Pharo Open Source Smalltalk — Release 1.4". Pharo-project.org. April 17, 2012. Retrieved April 5, 2013.
- ^ "Pharo Open Source Smalltalk — Release 2.0". Pharo-project.org. March 18, 2013. Retrieved April 5, 2013.
- ^ "Pharo Open Source Smalltalk — Release 3.0". pharo.org. April 30, 2014.
- ^ "Pharo Open Source Smalltalk — Release 4.0". pharo.org. April 15, 2015.
- ^ "Pharo Open Source Smalltalk — Release 5.0". pharo.org. May 12, 2016.
- ^ "Pharo Open Source Smalltalk - Release 6.0". pharo.org. June 6, 2017.
- ^ "Pharo 6.1 released". pharo.org. July 24, 2017.
- ^ "(Press Release) Pharo Open Source Smalltalk — Success stories". Pharo-project.org. Retrieved April 5, 2013.
- ^ "Home". seaside.st. March 18, 2007. Retrieved April 5, 2013.
- ^ "Zinc HTTP Components". Zn.stfx.eu. Retrieved April 5, 2013.
- ^ Girba, Tudor. "Home". Moose technology. Retrieved April 5, 2013.
- ^ "Agile Visualization". Object Profile. Retrieved May 31, 2018.
- ^ "web: Pharo Consortium". Consortium.pharo.org. March 31, 2013. Retrieved April 5, 2013.
- ^ Ducasse, Stephane. "association: Pharo Association". Association.pharo.org. Retrieved April 5, 2013.
- ^ "Cog Blog". Mirandabanda.org. Retrieved April 5, 2013.
- ^ "7-point summary of the Spur memory manager". Clément Béra. Retrieved April 17, 2015.