3 ms·
Rust is essentially C++ with restrictions that make threads safer. Pony is a completely new language based on the actor model where "threading" is a first-clas
by mcguire 6y ago
Rust is essentially C++ with restrictions that make threads safer.
Pony is a completely new language based on the actor model where "threading" is a first-class operation and the type system is formally designed to make guarantees that make threads safer.
Pony really wants you to think differently about your problem and solution.
- staticassertion 6y agoWhile Pony is awesome, I think what you describe is a weakness and not a strength. If Pony were to move more of its hardest concepts to standard libraries, it would be a far simpler language, even if it maintained the actor/behavior concepts. Much of Pony can be done with Arc/Mutex/&/move in Rust, but with special syntax, and it's that special syntax that kills the language frankly. You can implement actors in Rust pretty easily. I've done it multiple times, including in a way that provides a pony-like nominal interface. It isn't as powerful, and it isn't as efficient, because frankly I'm not very good at this sort of thing and don't have time to work on it, but it's possible. What pony gives is some syntactic sugar in some important places (the actor keyword, the be keyword) and a very strong runtime.
- OkayPhysicist 6y agoThe "move the hard parts to standard libraries" approach is exactly the approach Elixir and Erlang take. The OTP (the standard library for Erlang, and called seamlessly from Elixir) provides abstractions for almost every use case you'll ever need. It's super easy to write Elixir/Erlang without ever righting an explicit "receive" statement.
- pjmlp 6y ago> Rust is essentially C++ with restrictions that make threads safer. And saner defaults for type safety. As much as I enjoy C++, the safety defaults due to backwards compatibility are mostly wrong.