Pony vs ASP.NET Core
When comparing Pony vs ASP.NET Core, the Slant community recommends Pony for most people. In the question“What are the best programming languages for concurrent programming?” Pony is ranked 8th while ASP.NET Core is ranked 16th. 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 Fast and getting faster
Thanks to breakthroughs in ROSLYN compiler and the efforts of the .NET COre developer team, code written in C# can reach speeds just a step behind C++.
Pro Multi platform
Can run on Windows, Linux and Mac (also Visual Studio Code editor).
Pro JSON optimization
In .NET Core 2.1 and 3.0, new APIs are added that make it possible to write JSON APIs that require less memory, using Span<T> and UTF8 strings, and improve throughput of applications like Kestrel, ASP.NET Core web server. See also Utf8JsonReader.
Pro Tutorials and documentation quality
Both microsoft and 3rd party tutorials are mostly of high quality and encourage you to use the industry best-practices.
Pro Built-in middleware
Built-in middleware featuring: Authentication, Cookie policy, Health Check, MVC, Session etc.
Pro Hosting
Ability to host on IIS, Nginx, Apache, Docker, or self-host in your own process.
Pro Ease of Use
Pro Security
It is a very secure platform.
Pro Tooling
Both VS and VSCode are powerful free IDEs that are well integrated with ASP.net Core. VS Community also allows for commercial use for projects with less than 5 developers.
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.