Pharo

Print Print
Reading time 6:24

Pharo
Pharo Logo v3.0.svg
Pharo 6.0.jpg
ParadigmObject-oriented
DeveloperPharo community
First appeared2008; 13 years ago (2008)
Stable release
8.0 / January 20, 2020; 16 months ago (2020-01-20)
Typing disciplineDynamic
Implementation languageSmalltalk
OSWindows, Linux, macOS, others
LicenseMIT license, partly Apache License 2.0[1]
Websitepharo.org
Influenced by
Smalltalk (Squeak)

Pharo is an open source dynamic and reflective language which is inspired by the programming language Smalltalk. Pharo offers several live programming features such as immediate object manipulation, live update and hot recompiling.

Introduction

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" (French pronunciation: ​[faʁ]) 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

  • A pure object-oriented approach
  • Simple syntax
  • Immediate object identity swapping
  • Resumable exceptions
  • Live object inspection
  • Dynamic inheritance
  • Multiplatform virtual machine with JIT, combined generational garbage collector, ephemerons, forwarders
  • Easy call stack manipulation
  • Fast object enumeration
  • Objects as methods
  • Optional Green threads
  • AST metalinks
  • Customizable metaclasses
  • Relatively low memory consumption
  • Customizable compiler
  • Optional complete object memory persistence
  • Fast object serialization
  • Easy use of 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.[how?]

Language syntax

Pharo syntax postcard

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
{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 preferred 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 [1] 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) [2] and the Pharo association for physical persons [3].


Pharo look history.png
Version Release date Major features
March 16, 2008 [2] 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[3] Ring metamodel, better code simulator
Pharo 2.0 March 18, 2013.[4] browser improvements, QA tools, Fuel serializer, better files API
Pharo 3.0 April 2014.[5] new modular compiler (Opal) and debugger, continuations
Pharo 4.0 April 2015.[6] GTools, slots
Pharo 5.0 May 2016. [7] Spur VM, UFFI, improved reflectivity
Pharo 6.0 6 June, 2017. [8] 64-bit and Git support
Pharo 6.1 24 July, 2017. [9] improved Git support
Pharo 7.0 22 January, 2019. [10] bootstrapping, new code browser (Calypso), stateful traits
Current stable version: Pharo 8.0 20 January, 2020. [11] improved support of Git, testing, refactoring and Windows


Use of Pharo

Companies and consultants

Some companies use Pharo for their development projects.[12] In particular, they use:

  • Seaside for dynamic web development[13]
  • Zinc for server architectures[14]
  • Moose[15] to analyse data and software from all programming languages
  • Graphic libraries for evolved user interfaces
  • Roassal to visualize data[16]

The Pharo consortium[17] was created for companies wishing to support the Pharo project. The Pharo association[18] was recently[when?] 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.[19] 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.[20]

See also

  • Amber Smalltalk
  • GNU Smalltalk
  • Squeak
  • VisualWorks

References

  1. ^ Pharo license information
  2. ^ "Pharo got 10 years". Pharo-project.org. Retrieved May 31, 2018.
  3. ^ "Pharo Open Source Smalltalk — Release 1.4". Pharo-project.org. April 17, 2012. Retrieved April 5, 2013.
  4. ^ "Pharo Open Source Smalltalk — Release 2.0". Pharo-project.org. March 18, 2013. Retrieved April 5, 2013.
  5. ^ "Pharo Open Source Smalltalk — Release 3.0". pharo.org. April 30, 2014. Archived from the original on August 23, 2017. Retrieved May 1, 2014.
  6. ^ "Pharo Open Source Smalltalk — Release 4.0". pharo.org. April 15, 2015. Archived from the original on August 23, 2017. Retrieved April 16, 2015.
  7. ^ "Pharo Open Source Smalltalk — Release 5.0". pharo.org. May 12, 2016. Archived from the original on December 29, 2017. Retrieved May 13, 2016.
  8. ^ "Pharo Open Source Smalltalk - Release 6.0". pharo.org. June 6, 2017.
  9. ^ "Pharo 6.1 released". pharo.org. July 24, 2017.
  10. ^ "Pharo 7.0 released". pharo.org. January 22, 2019.
  11. ^ "Pharo 8.0 Released!". pharo.org. January 20, 2020.
  12. ^ "(Press Release) Pharo Open Source Smalltalk — Success stories". Pharo-project.org. Retrieved April 5, 2013.
  13. ^ "Home". seaside.st. March 18, 2007. Retrieved April 5, 2013.
  14. ^ "Zinc HTTP Components". Zn.stfx.eu. Retrieved April 5, 2013.
  15. ^ Girba, Tudor. "Home". Moose technology. Retrieved April 5, 2013.
  16. ^ "Agile Visualization". Object Profile. Retrieved May 31, 2018.
  17. ^ "web: Pharo Consortium". Consortium.pharo.org. March 31, 2013. Retrieved April 5, 2013.
  18. ^ Ducasse, Stephane. "association: Pharo Association". Association.pharo.org. Retrieved April 5, 2013.
  19. ^ "Cog Blog". Mirandabanda.org. Retrieved April 5, 2013.
  20. ^ "7-point summary of the Spur memory manager". Clément Béra. Retrieved April 17, 2015.

External links

By: Wikipedia.org
Edited: 2021-06-18 18:16:14
Source: Wikipedia.org