When comparing Pony vs Lobster, the Slant community recommends Pony for most people. In the question“What are the best (productivity-enhancing, well-designed, and concise, rather than just popular or time-tested) programming languages?” Pony is ranked 22nd while Lobster is ranked 26th. The most important reason people chose Pony is:
The unique type system allows the compiler to automatically schedule actors on threads, giving you reliable concurrency for free.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Concurrency model based on actors
The unique type system allows the compiler to automatically schedule actors on threads, giving you reliable concurrency for free.
Pro Reliable
Because of its capabilities secure type system, provided you don't use the C FFI, references will never be stale, race conditions are effectively impossible, deadlocks don't happen because locks and mutexes are never needed, and processes never crash because all exceptions must be handled. (Barring compiler bugs or external memory corruption, of course.) Pony programs can still lock up due to infinite loops, like any Turing-complete language.
Pro High performance
Compiles to native code, and features an intelligent garbage collector that takes advantage of the actor architecture to get essentially free garbage collection.
Pro Trivially simple C FFI
Calling low-level C functions is as simple as use "lib:clibrary"
and @c_function_name[return_type](parameter:type)
. Linking C to Pony libraries is just as easy, as the Pony compiler will generate appropriate header files.
Pro Compile time reference counting
Unlike Rust doesn't make the programmer jump through hoops, mainly automatic. Does an analysis similar to the Rust borrow checker to infer lifetimes, but makes life easier on the programmer.
Pro Python-esque syntax
There's an audience who loves that.
Pro WebAssembly backend
More options for users.
Pro Inline structs
Structs are allocated in their parent, and come at zero overhead.
Pro Automatic memory management
Better than Rust. No sadism.
Pro Type inference algorithm
Just works. Goes further than most languages in terms of allowing code without types.
Cons
Con All exceptions must be caught
The compiler enforces this, so code is littered with try
s.
Con Limited documentation
As Pony is such a new language, documentation is relatively light, and tutorials are few and far-between.
Con Few libraries
Con Garbage collector can't run until you yield
A long-running behavior can leak memory because the garbage collector has no chance to run.
Con Limited tooling
There's no IDE. Debuggers are fairly basic. Pony is too young to have much of an ecosystem.
Con Divide by zero is allowed
And instead of some sensible result like NaN or Inf, the answer is zero! Most languages would just raise an exception (and Pony used to do this), but since the compiler enforces the rule that "all exceptions must be caught" the proliferation of try
s was determined to be too burdensome on the programmer. This makes the whole design of the exception system questionable.
Con Unstable API
Pony is not ready for production. It has yet to release version 1.0, and there are frequent breaking changes.
Con Difficult learning curve
The type system uses a capabilities-oriented approach to reference semantics, which can be difficult to wrap your head around at first. The lack of more common object-oriented features and the preference for simplicity over familiarity can make it difficult for new users to model their program design.
Con Small community
Lead doesn't appear to be so ambitious or has a vision to push making more popular.
Con Compile time reference counting not 100%
Around 5% of time, need to escape to runtime reference counting. Working to get the percentage as low as possible.
Con Lobster not yet totally written in Lobster
Core written in C++. Plans to change that, but has been a long time.
Con Python-like syntax, but different use case and domain
Not Python compatible and often significantly different in purpose and use cases.