When comparing PureScript vs C#, the Slant community recommends PureScript for most people. In the question“What are the best languages for learning functional programming?” PureScript is ranked 12th while C# is ranked 21st. The most important reason people chose PureScript is:
Has Typeclasses and RankNTypes
Ranked in these QuestionsQuestion Ranking
Pro Higher kinded types
Has Typeclasses and RankNTypes
Pro High performance FFI code
Pro Modules can be compiled to CommonJS
Pro Has row polymorphism and extensible effects
Pro Type safety
Compiling should be your first unit test. A tight type system (static and hopefully strong) will catch many logic errors that are often difficult to spot through debugging. In languages like PureScript, if it compiles, it often runs properly.
Pro Pure functional language
You cannot have side effects, unless a function is explicitly defined as so.
FFI system is quite good and easy to use. You can import functions curried or not curried. Records and arrays use native JS objects and arrays.
Pro Awesome web frameworks
Halogen (VDOM, similar to ELM)
And hit these up with Signals, Isolated/(Managed?) Components, powerful functions and FFI
.NET offers rich functionality.
Pro 3rd Party support
Lot's of tools and libraries available.
Pro Visual Studio
The Visual Studio IDE offers one of the best development environments. The Community Edition can be used for free.
Pro Can be used in a variety of fields
with Xamarin for Mobile (ios, android)
with .net core asp for server (linux, windows)
with .net core for desktop (windows, mac)
with mono for desktop (windows, linux)
with blazor for web client with webassembly.
However, it is not considered top for any of those categories
top choice for windows desktop with .net framework
top choice for Unity
.net 5 will unify frameworks similar to JVM (just one)
Runs on Linux, Mac, and Windows
Can be designed visually with the Visual Studio designer for traditional Windows forms, WPF, or Web forms.
Pro It is a C like language.
Being a C like language counts in favor for it as a general purpose programming language, given the ease of using existing skills to pick up this language easily.
there are other superior languages that could be used as a general purpose, such as: F#, Haskell, but the complexity of those languages, being functional, make them strange to the usual C Syntax.
C# is better than C whenever garbage collection, Objects, classes, data access, are needed. But C is going to be the choice when hardware access and performance are paramount.
Con Lots of dependencies needed to get started
Purescript is written in Haskell, but meant to be used with Node.js. As a result, to get started , users must install ghc, cabal, node.js, grunt, and bower. Purescript also has its own compiler, and different semantics form Haskell, and so even after installing, there's still some overhead to getting productive with Purescript.
Con Lack of good IDE/tooling support
Con Restrictive FFI
Con Documentation not updated
Con Ecosystem not stable
Con Slow compilation
On large project, for example Halogen
Con Learning curve
For a beginner the .NET framework can be daunting, the rich functionality means that things often can be done in several ways.
Con Microsoft will mess up with the Visual studio installation
And all of a sudden you'll need to reinstall the entire thing just because it stopped working.
Microsoft assumes that every workstation is connected to the Internet then it is always pushing updates.
Con Very large runtime
Cannot be used for embedded programming