Draft:Pony (programming language): Difference between revisions
AdrianBoyko (talk | contribs) Rework continues... |
AdrianBoyko (talk | contribs) m Reference to ACM paper. |
||
Line 22: | Line 22: | ||
'''Pony''' (sometimes referred to as '''ponylang''') is a [[Free software|free]] and [[open-source|open source]], object-oriented, actor model, capabilities-secure, high performance programming language. Pony's "reference capabilities" allow even mutable data to be safely passed between actors ''by reference''. Garbage collection is based on the ORCA protocol which leads to independent and concurrent garbage collection across actors, without the need to "stop the world". |
'''Pony''' (sometimes referred to as '''ponylang''') is a [[Free software|free]] and [[open-source|open source]], object-oriented, actor model, capabilities-secure, high performance programming language. Pony's "reference capabilities" allow even mutable data to be safely passed between actors ''by reference''. Garbage collection is based on the ORCA protocol which leads to independent and concurrent garbage collection across actors, without the need to "stop the world". |
||
==Language design== |
==Language design== |
||
Line 28: | Line 27: | ||
=== Safety === |
=== Safety === |
||
* Type Safety - Pony is a type safe language.<ref>https://www.ponylang.org/media/papers/fast-cheap.pdf</ref> |
* Type Safety - Pony is a type safe language.<ref>https://www.ponylang.org/media/papers/fast-cheap.pdf</ref> |
||
* Memory |
* 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. |
||
* Exception Safety - There are no runtime exceptions. All exceptions have defined semantics |
* Exception Safety - There are no runtime exceptions. All exceptions have defined semantics and they are always caught. |
||
* Concurrency Safety - Pony does not have locks or atomic operations. Instead, the type system |
* Concurrency Safety - Pony does not have locks or atomic operations. Instead, the type system employs reference capabilities<ref>{{cite conference |
||
| author = Sylvan Clebsch, Sophia Drossopoulou, Sebastian Blessing, Andy McNeil |
|||
| title = Deny capabilities for safe, fast actors |
|||
| book-title = AGERE! 2015: Proceedings of the 5th International Workshop on Programming Based on Actors, Agents, and Decentralized Control |
|||
| date = October 2015 |
|||
| pages = 1-12 |
|||
| publisher = Association for Computing Machinery |
|||
| location = Pittsburgh, PA, USA |
|||
| isbn = 9781450339018 |
|||
| doi = 10.1145/2824815.2824816 |
|||
| editor = Elisa Gonzalez Boix, Philipp Haller, Alessandro Ricci, Carlos Varela |
|||
}}</ref> to ensure (at compile time) that your program is free of data races and deadlocks. |
|||
=== Performance === |
=== Performance === |
||
* Native Code - Pony is an ahead-of-time (AOT) compiled language. There is no interpreter or virtual machine |
* Native Code - Pony is an ahead-of-time (AOT) compiled language. There is no interpreter or virtual machine |
Revision as of 19:26, 20 June 2024
Draft article not currently submitted for review.
This is a draft Articles for creation (AfC) submission. It is not currently pending review. While there are no deadlines, abandoned drafts may be deleted after six months. To edit the draft click on the "Edit" tab at the top of the window. To be accepted, a draft should:
It is strongly discouraged to write about yourself, your business or employer. If you do so, you must declare it. Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
Last edited by AdrianBoyko (talk | contribs) 5 months ago. (Update) |
Paradigm | Actor model, Object-oriented, Imperative |
---|---|
Designed by | Sylvan Clebsch |
First appeared | November 9, 2012 |
Stable release | 0.58.5
/ June 1, 2024 |
Typing discipline | strong, static, inferred, nominal, structural |
Implementation language | C |
License | BSD-2.[1] |
Website | www |
Influenced by | |
E | |
Influenced | |
Encore, Project Verona[2], Savi, Inko |
Pony (sometimes referred to as ponylang) is a free and open source, object-oriented, actor model, capabilities-secure, high performance programming language. Pony's "reference capabilities" allow even mutable data to be safely passed between actors by reference. Garbage collection is based on the ORCA protocol which leads to independent and concurrent garbage collection across actors, without the need to "stop the world".
Language design
At its core, Pony is a systems language designed around safety and performance.
Safety
- Type Safety - Pony is a type safe language.[3]
- 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.
- Exception Safety - There are no runtime exceptions. All exceptions have defined semantics and they are always caught.
- Concurrency Safety - Pony does not have locks or atomic operations. Instead, the type system employs reference capabilities[4] to ensure (at compile time) that your program is free of data races and deadlocks.
Performance
- Native Code - Pony is an ahead-of-time (AOT) compiled language. There is no interpreter or virtual machine
- Concurrent Garbage Collection - Each actor's heap is collected separately and concurrently, avoiding the need to "stop the world" for global collection.
Examples
A few examples of idiomatic Pony follow.
Hello World
In Pony, instead of a main function, there is a main actor. The creation of this actor serves as the entry point into the Pony program.
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
There are no global variables in Pony, everything must be contained within an instance of a class or an actor. As such, even the environment that allows for printing to stdout is passed as a parameter.
History
In 2011, Sylvan Clebsch created a C-based actor library in order to solve some real problems for software he was creating. Ultimately this library became the first implementation of Pony in 2012.
References
- ^ https://github.com/ponylang/ponyc/blob/master/LICENSE
- ^ "Verona FAQ". Github.
- ^ https://www.ponylang.org/media/papers/fast-cheap.pdf
- ^ Sylvan Clebsch, Sophia Drossopoulou, Sebastian Blessing, Andy McNeil (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: authors list (link)
External links
- Offical website
- Composition over Inheritance with Pony
- QCon London: Co-Designing a Type System and Runtime
- InfoQ Interview: Sylvan Clebsch on the Actor-Model Language Pony, Garbage Collection, Capabilities, Concurrency
- From Go to Pony
- InfoQ: Using the Actor-model Language Pony for FinTech
- Pony: Making it easy to write efficient, concurrent, data race free programs at Curry On 2015 associated with ECOOP 2015