When comparing PureScript vs Swift, the Slant community recommends Swift 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?” Swift is ranked 32nd while PureScript is ranked 40th.
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
Pro Modern syntax
Pro Swift is closer to other platforms
Apple’s modern programming language is easier to understand for non-iOS developers and minimizes time for additional explanations and clarifications. Moreover, Swift can be used as a script language. It is an interesting solution for the iOS community to unify writing of build scripts. At the time being iOS developers are split up in regard to this activity. Some of them write build scripts in Bash, others use Ruby, Python, etc. Swift gives an amazing opportunity to be applied to all iOS programming needs.
More details can be found here https://mlsdev.com/blog/51-7-advantages-of-using-swift-over-objective-c
Pro Works with Apple's Cocoa and Cocoa Touch frameworks
Pro Can be used as a Just-In-Time language
Pro Inherent parallelism
Pro Low memory footprint due to reference counting
Pro Backed by Apple
Pro Performance speed comparable to native C
Pro Swift has some clever tricks up its sleeve
Due to having elements of a functional programming language. Things like 'map' and 'filter' for example.
Pro Uses LLVM compiler and Obj-C runtime allowing C, Objective-C, Objective-C++ and Swift code to run side by side within a single program
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 Swift is a moving target
They've released 1.2 so far, and 2.0 is coming soon. Every small update brings adjustments to paradigms (such as how to do type casting) that can be a little frustrating to absorb. Objective C was also constantly updating, however, but not at the same rate these days.