When comparing Swift vs MS PowerShell, the Slant community recommends Swift for most people. In the question“What is the best programming language to learn first?” Swift is ranked 30th while MS PowerShell is ranked 61st.
Ranked in these QuestionsQuestion Ranking
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
Pro Helpful Help
The help system is designed to evolve over time; running
update-help downloads the latest content.
When searching for help on items, you can simply type
help commandname to get information about a command.
If you're not sure what you're looking for, but have a rough idea, you can search on partial command names, or even specify specific verbs to get a list of commands potentially of interest; e.g.
help -verb write.
The information in help gives a good overview of the commands you're looking at, along with code examples, so you can see real-world usage without resorting to the web.
When calling a method with multiple parameters, rather than passing one variable per parameter you're able to "splat" one variable to the method, with the parameters taking their values from its properties.
Commands can be chained via the pipeline, allowing output from one to be cleanly fed as input to the next.
Pro Chocolatey Package
PowerShell is installable through Chocolatey.
The language can wrap and interact with code written in other language's, making it highly extensible.
Pro Multi-Platform (ish)
Though Windows Powershell only works on Windows, the open source implementation Pash (http://pash.sourceforge.net/) allows the same language to be run on other OSes.
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.
Con Very verbose
The commands themselves, as well as the output and error messages, are VERY verbose