Hacker News new | ask | show | jobs
by jitl 3102 days ago
Pony has an Actor as a language-level concept, which significantly reduces the amount of “thinking about mechanism” that a programmer needs to do to build safe, highly-concurrent programs.

Quick read: https://tutorial.ponylang.org/types/actors.html

I think one could implement a similar system in Nim using the primitives that you posted, plus some kind of channel, but:

1. Such a system is not included in the standard library (?)

2. Even if a package containing such a system outside the stdlib were available, it would not receive the same application and usage by the Nim community, as Pony actors will in the Pony community

3. So, Pony is better suited to foster a community for highly concurrent programming

1 comments

Does an actor system need to be part of the language? In the Scala world, there's the akka library to provide actors (but of course you could use a totally different actor system instead). Alternatively in Elixir, actors (Processes) with their send/receive functionality is built into the language and each module can essentially be an actor.

I guess the trade off is that if it's a part of the language, you get it standard and built in as a language construct. But if it's in an external library, you can use different actor systems and benchmark them accordingly.

one benefit is that you can effectively embed the concept directly into the type system, allowing for ergonomic expression of actor model code. i'm not sure to what extent pony does this, though i believe it's capability typing was designed with actors in mind.