Anyone built anything with Pony?

Looks like might be an interesting lang.

What is Pony

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

If you are looking to jump in and get started with Pony right now , you can try it in your browser using the Pony Playground. Keep reading if you are interested in what makes Pony different and why you should consider using it.

If you are interested in the early history of Pony and how it came into existence, you’re in luck: “An Early History of Pony”.

1 Like

There were quite a few mentions of it in this thread…

Not a fan of the syntax myself (not keen on whitespace significance in languages)…

class Wombat
  let name: String
  var _hunger_level: U64
  var _thirst_level: U64 = 1

  new create(name': String) =>
    name = name'
    _hunger_level = 0

  new hungry(name': String, hunger': U64) =>
    name = name'
    _hunger_level = hunger'

Though…

Pony and Whitespace

Whitespace (e.g. spaces, tabs, newlines, etc.) in Pony isn’t significant.

Well, it mostly isn’t significant.

Mostly insignificant whitespace

Pony reads a bit like Python, which is a whitespace significant language. That is, the amount of indentation on a line means something in Python. In Pony, the amount of indentation is meaningless.

That means Pony programmers can format their code in whatever way suits them.

There are three exceptions:

  1. A - at the beginning of a line starts a new expression (unary negation), whereas a - in the middle of an expression is a binary operator (subtraction).
  2. A ( at the beginning of a line starts a new expression (a tuple), whereas a ( in the middle of an expression is a method call.
  3. A [ at the beginning of a line starts a new expression (an array literal), whereas a [ in the middle of an expression is generic formal parameters.

That stuff may seem a little esoteric right now, but we’ll explain it all later. The - part should make sense though.

3 Likes