Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Pony (programming language)

From Wikipedia, the free encyclopedia
Programming language
Pony
ParadigmActor model,Object-oriented,Imperative
Designed bySylvan Clebsch[1]
First appeared28 April 2015; 10 years ago (2015-04-28)[2]
Stable release
0.60.4 (Beta) / October 31, 2025; 3 months ago (2025-10-31)
Typing disciplinestrong,static,inferred,nominal,structural
Implementation languageC
LicenseBSD-2.[3]
Websitewww.ponylang.org
Influenced by
E[4]
Influenced
Project Verona[5]

Pony (also referred to asponylang) is afree andopen source, object-oriented,actor model,capabilities-secure, high performance programming language.[6][7] Pony's reference capabilities allow even mutable data to be safelypassed by reference between actors.Garbage collection is performedconcurrently, per-actor, which eliminates the need to pause program execution or"stop the world".[8][9][10] Sylvan Clebsch is the original creator of the language.[11][12] It is now being maintained and developed by members of the Pony team.[13]

History

[edit]

The language was created by Sylvan Clebsch, while aPhD student atImperial College London. His professor at that time wasSophia Drossopoulou, who is also well known for her contributions to computer programming, and as a lecturer. According to developers who have talked to Sylvan, he was frustrated with not having a high performance language that could run concurrent code securely, safely, and more simply.[14]

Language design

[edit]

At its core, Pony is a systems language designed around safety and performance.

Safety

[edit]
  • Type safety - Pony is a type safe language.[15]
  • Memory safety - There are no dangling pointers and no buffer overruns. There is no null but optional types can be safely represented using unions with the None type.[6][16]
  • Exception safety - There are no runtime exceptions. All exceptions have defined semantics and are always caught.[17]
  • Concurrency safety - The type system employs reference capabilities to ensure (at compile time) that there are nodata races nordeadlocks.[18][19][20][21]

Performance

[edit]
  • Lock-free - By design, Pony avoids the need for traditional locking mechanisms, which eliminates the overhead and contention associated with locks.[14]
  • Native code - Pony is anahead-of-time compiled language. There is no interpreter or virtual machine[18][16]
  • Concurrent garbage collection - Each actor's heap is collected separately and concurrently, avoiding the need to "stop the world" for global collection.[11][12][21]

Examples

[edit]

Hello World

[edit]

In Pony, instead of a main function, there is a mainactor. The creation of this actor serves as the entry point into the Pony program.[6][17]

actorMainnewcreate(env:Env)=>env.out.print("Hello, world!")

There are no global variables in Pony, meaning everything must be contained within an instance of a class or an actor.[14] As such, even the environment that allows for printing tostandard output is passed as a parameter.[14][6]

References

[edit]
  1. ^"Sylvan Clebsch".ACM.
  2. ^"First public release".GitHub. 28 April 2015.
  3. ^"Ponyc/LICENSE at main · ponylang/Ponyc".GitHub.
  4. ^Daniele BonettaLuca; Svizzera italiana; Stefan Marr; Walter Binder (2 November 2016)."GEMS: Shared-Memory Parallel Programming for Node.js".oracle. Retrieved10 March 2025.Pony is itself inspired by the design of E's programming model
  5. ^Liam Tung."Microsoft opens up Rust-inspired Project Verona programming language on GitHub".ZDNet.Project Verona, which also borrows concepts from Cyclone, a "safe dialect of C" and Pony, which has key contributors from Microsoft Research
  6. ^abcdAllen 2024.
  7. ^"Introduction to Actor Model".adabeat. 8 August 2024. Retrieved8 March 2025.
  8. ^Sylvan Clebsch; Juliana Franco; Sophia Drossopoulou (12 October 2017)."Ownership and Reference Counting Based Garbage Collection in the Actor World".Proc. ACM Program. Lang.1 (OOPSLA): 72:1–72:28.doi:10.1145/3133896. Retrieved24 December 2024.
  9. ^"Introduction to the Pony Programming Language".LinkedIn. Society 5 Solutions. 15 October 2024. Retrieved28 December 2024.
  10. ^Daniel Caccamo (2018)."GoA: Actors with Locally Managed Memory for Go".UWSpace. Retrieved28 December 2024.
  11. ^abCharles Humble (14 March 2016)."Using the Actor-model Language Pony for FinTec".InfoQ. Retrieved24 December 2024.
  12. ^abSophia Drossopoulou (14 September 2020)."Pony, Actors, Causality, Types, and Garbage Collection".InfoQ. Retrieved24 December 2024.
  13. ^"Team Pony".GitHub. Retrieved28 December 2024.
  14. ^abcdKristoffer Grönlund (22 January 2018).Everyone gets a pony!.archive.Linux Conference Australia 2018 (LCA2018). Retrieved28 December 2024.
  15. ^John Mumm (19 March 2019)."Safely Sharing Data: Reference Capabilities in Pony".codemotion. Retrieved28 December 2024.
  16. ^abAnkush Thakur (21 December 2024).12 New Programming Languages You Should Know.geekflare. Retrieved3 January 2025.
  17. ^abMCStone 2023.
  18. ^abMölle 2017.
  19. ^Sean T Allen (30 May 2018)."Introduction to the Pony programming language".opensource. Retrieved28 December 2024.
  20. ^Sylvan Clebsch; Sophia Drossopoulou; Sebastian Blessing (October 2015). "Deny capabilities for safe, fast actors". In Elisa Gonzalez Boix, Philipp Haller, Alessandro Ricci, Carlos Varela (ed.).AGERE! 2015: Proceedings of the 5th International Workshop on Programming Based on Actors, Agents, and Decentralized Control. Pittsburgh, PA, USA: Association for Computing Machinery. pp. 1–12.doi:10.1145/2824815.2824816.ISBN 9781450339018.{{cite conference}}: CS1 maint: multiple names: editors list (link)
  21. ^abJuliana Franco; Sylvain Clebsch; Sophia Drossopoulou; Jan Vitek; Tobias Wrigstad (9 March 2018)."Soundness of a Concurrent Collector for Actors"(PDF).imperial. Retrieved8 March 2025.

Further reading

[edit]
  • Mölle, Andreas (Dec 2017). "Developing concurrent programs with Pony".Linux Magazine (205).ISSN 1536-4674.
  • MCStone, Maverick (Dec 2023).Pony Playbook: Mastering the Basics of Concurrent Programming. Independently Published.ISBN 979-8870768175.
  • Allen, Corby (Jul 2024).Pony Programming: The Complete Guide to Building High-Performance, Concurrent, and Secure Applications with Pony. Independently Published.ISBN 979-8332662072.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Pony_(programming_language)&oldid=1328824089"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp