Pony (programming language): Difference between revisions

Content deleted Content added
m Cleaning up submission (AFCH)
cleanup
Line 1:
{{AFC submission|||u=Wukuendo|ns=118|ts=20250103143656}} <!-- Do not remove this line! -->
 
<!-- -->
 
<!-- Note: The following pages were redirects to [[Pony_(programming_language)]] before draftification:
Line 31 ⟶ 29:
At its core, Pony is a systems language designed around safety and performance.
=== Safety ===
* [[Type safety|Type Safety]] - Pony is a type safe language.<ref>https://www.ponylang.org/media/papers/fast-cheap.pdf</ref><ref name="hnoon"></ref>
* [[Memory safety|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.{{Sfn|Allen|2024}}<ref name="atpony">{{cite conference |author=Ankush Thakur |date=21 December 2024 | title=12 New Programming Languages You Should Know| url=https://geekflare.com/dev/new-programming-languages/| access-date=3 January 2025 |website=geekflare}}</ref>
* [[Exception safety|Exception Safety]] - There are no runtime exceptions. All exceptions have defined semantics and they are always caught.{{Sfn|MCStone|2023}}
* Concurrency Safety - The type system employs reference capabilities to ensure (at compile time) that yourthere programare is free ofno [[Race_condition|data races]] andnor [[Deadlock_(computer_science)|deadlocks]].{{Sfn|Mölle|2017}}<ref name="ipony">{{cite web |author=Sean T Allen |date=30 May 2018 |title=Introduction to the Pony programming language |url=https://opensource.com/article/18/5/pony |access-date=28 December 2024 |website=opensource}}</ref><ref>{{cite conference |author1 = Sylvan Clebsch | author2 = Sophia Drossopoulou | author3 = Sebastian Blessing | 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><ref name="jmpony">{{cite web |author=John Mumm |date=19 March 2019 |title=Safely Sharing Data: Reference Capabilities in Pony |url=https://talks.codemotion.com/safely-sharing-data-reference-capabiliti |access-date=28 December 2024 |website=codemotion}}</ref>
| author1 = Sylvan Clebsch
| author2 = Sophia Drossopoulou
| author3 = Sebastian Blessing
| 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><ref name="jmpony">{{cite web |author=John Mumm |date=19 March 2019 |title=Safely Sharing Data: Reference Capabilities in Pony |url=https://talks.codemotion.com/safely-sharing-data-reference-capabiliti |access-date=28 December 2024 |website=codemotion}}</ref>
 
=== Performance ===
Line 58 ⟶ 43:
 
===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.{{Sfn|Allen|2024}}{{Sfn|MCStone|2023}}
 
<syntaxhighlight lang="pony">
Line 66 ⟶ 51:
</syntaxhighlight>
 
There are no global variables in Pony, everything must be contained within an instance of a class or an actor.<ref name="kgpony">< /ref> As such, even the environment that allows for printing to '''[[stdout''']] is passed as a parameter.
 
==References==