Jump to content

Draft:Pony (programming language): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
HasteurBot (talk | contribs)
User:HasteurBot:Nominating for CSD:G13
Basic Page Framework, Needs more work.
Line 1: Line 1:
{{db-g13|ts=2017-07-15T16:56:12Z}}
{{AFC submission|d|web|u=Autodidaddict|ns=118|decliner=Shadowowl|declinets=20170715165612|ts=20170715153954}} <!-- Do not remove this line! -->
{{AFC submission|d|web|u=RealityDysfunction|ns=118|decliner=SwisterTwister|declinets=20170120192920|small=yes|ts=20170120190503}} <!-- Do not remove this line! -->

{{AFC comment|1=Source no. 3 is not independent of the subject. {{User:Shadowowl/Sig}} 16:56, 15 July 2017 (UTC)}}

{{AFC comment|1=This would've needed all major reviews. [[User:SwisterTwister|<font color="green">'''S'''wister'''T'''wister</font>]] [[User talk:SwisterTwister|<font color="green">talk</font>]] 19:29, 20 January 2017 (UTC)}}

----

{{Infobox programming language
{{Infobox programming language
| name = Pony
| name = Pony
| paradigm = [[Actor model]]
| logo = <!-- (filename) -->
| logo caption =
| designer = Sylvan Clebsch
| screenshot = <!-- (filename) -->
| influenced by = [[E (programming language)|E]], [[Rust (programming language)|Rust]]
| screenshot caption =
| influenced = {{URL|https://www.gitbook.com/book/stw/the-encore-programming-language/details|Encore}}
| paradigm = <!-- or: | paradigms = -->
| latest_release_version = 0.15.0
| family =
| latest_release_date = {{start date and age|2017|08|07}}
| designer = [[Sylvan Clebsch]]
| typing = [[strong typing|strong]], [[static typing|static]], [[type inference|inferred]], [[structural typing|structural]]
| developer = <!-- or: | developers = -->
| website = {{URL|http://www.ponylang.org}}
| year = {{release date and age|2012|11|09}}
| released = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| latest release version =
| license = [[BSD licenses|BSD]]-2.<ref>https://github.com/ponylang/ponyc/blob/master/LICENSE</ref>
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| programming_language = [[C (programming language)|C]]
| latest preview version =
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| typing =
| scope =
| programming language =
| discontinued =
| platform =
| operating system =
| license =
| file ext =
| file format = <!-- or: | file formats = -->
| website = <!-- {{url|www.example.com}} -->
| implementations = [[Ponylang]] [[Ponyc]]
| dialects =
| influenced by = [[Erlang (programming language)|Erlang]], [[Rust (programming language)|Rust]]
| influenced =
}}
}}


'''Pony''' is an open-source, object-oriented, actor-model, capabilities-secure, high-performance programming language.
'''Pony''' (often referred to as '''ponylang''') is a [[Free software|free]] and [[open-source|open source]], object-oriented, [[actor_model|actor model]], [[Capability-based_security|capabilities-secure]], high performance programming language. Pony blends together the [[Race condition|race-free]] guarantees of the [[Rust (programming language)|Rust]] programming language, static typing, generics, traits, and the structural typing so well used by the [[Go (programming language)|Go]] programming language. Its reference capabilities<ref>{{cite web | url=http://dl.acm.org/citation.cfm?id=2824816 |title=Deny capabilities for safe, fast actors |authors=Sylvan Clebsch, Sophia Drossopoulou, Sebastian Blessing, Andy McNeil |date=2015-10-26}}</ref> system allows developers to be explicit about how data is shared among components and actors, visually indicating what can and cannot be read from or written to.

This allows Pony to reside somewhere between the strict rules of [[Rust (programming language)|Rust]]'s borrow checker and [[Go (programming language)|Go]]'s flexible structural typing while still being able to make race-free and data sharing guarantees.

==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.

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

* Type Safe - Pony is a ''very'' type safe language. For more details on why, check out the mathematical proof<ref>https://www.ponylang.org/media/papers/fast-cheap.pdf</ref>
* Memory Safe - There are no dangling pointers and no buffer overruns. Like Rust, Pony does not even allow the concept of null.
* Exception-Safe -There are no runtime exceptions. All exceptions have defined semantics, and they are always caught.
* Data-race Free - Pony does not have locks or atomic operations. Instead, the type system ensures at compile time that your concurrent program can never have data races. This allows developers to write highly concurrent code with less change of problems occurring in the use of concurrency primitives.
* Deadlock-Free - Pony lacks language-level constructs to create locks. It is impossible to write code that compiles that will produce a deadlock.
* Native Code - Pony is an ahead-of-time (AOT) compiled language. There is no interpreter or virtual machine
* Compatible with C - Interop with C is enabled through [[Foreign function interface|FFI]]
* Garbage Collected - Each actor's heap is collected separately, there is ''no'' "stop the world" collection.

==Examples==
Here are a few examples of idiomatic Pony.

===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.

<syntaxhighlight lang="pony">
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
</syntaxhighlight>

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.

==References==
{{Reflist|30em}}

== External links ==


<ref>{{cite web |url=https://www.ponylang.org/discover/#what-is-pony |title=What is Pony? |accessdate=5 June 2018}}</ref>
* [http://www.ponylang.org Offical website]
<ref>{{cite web |url=https://opensource.com/article/18/5/pony?utm_medium=Email&utm_campaign=weekly&sc_cid=701f2000000RRACAA4 |title=Introduction to the Pony Programming Language |accessdate=5 June 2018}}</ref>
* [https://medium.com/@KevinHoffman/composition-over-inheritance-in-pony-33bbe107914 Composition over Inheritance with Pony]
* [https://qconlondon.com/ln2017/presentation/pony-co-designing-type-system-and-run-time QCon London: Co-Designing a Type System and Runtime]
* [https://www.infoq.com/interviews/clebsch-pony InfoQ Interview: Sylvan Clebsch on the Actor-Model Language Pony, Garbage Collection, Capabilities, Concurrency]
* [https://c7.se/from-go-to-pony/ From Go to Pony]
* [https://www.infoq.com/news/2016/03/pony-fintech InfoQ: Using the Actor-model Language Pony for FinTech]
* [https://www.youtube.com/watch?v=KvLjy8w1G_U Pony: Making it easy to write efficient, concurrent, data race free programs] at [http://curry-on.org/2015/sessions/pony-making-it-easier-to-write-efficient-concurrent-programs.html Curry On 2015] associated with [[ECOOP]] [http://2015.ecoop.org/ 2015]

Revision as of 16:57, 5 June 2018

Pony
Designed bySylvan Clebsch
Major implementations
Ponylang Ponyc
Influenced by
Erlang, Rust

Pony is an open-source, object-oriented, actor-model, capabilities-secure, high-performance programming language.

[1] [2]

  1. ^ "What is Pony?". Retrieved 5 June 2018.
  2. ^ "Introduction to the Pony Programming Language". Retrieved 5 June 2018.