DASH vs Ion (shell)
When comparing DASH vs Ion (shell), the Slant community recommends Ion (shell) for most people. In the question“What are the best UNIX shells?” Ion (shell) is ranked 7th while DASH is ranked 8th. The most important reason people chose Ion (shell) is:
All variable assignments may optionally specify a type, which will enforce that the supplies value is compatible with that type before storing it, returning an error if there's a mis-match.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Fast startup
Dash has a very fast startup, this happens because the shell is started a lot of times during boot and dash minimizes the work it does during this process.
Pro Low memory usage, which matters a lot in embedded
It is designed to be very lightweight and has no support for shell specific extensions that are not POSIX.
Pro Default shell on Debian systems
DASH is the default shell for Debian based systems due to it speed, full POSIX compliance and low overhead.
Pro Full POSIX support
It's fully POSIX compatible, so if your script runs on dash it will probably run on all other shells.
Pro A perfect clone
It's a clone of the original System V4 Bourne shell.
Pro Supports type-checking of assignments
All variable assignments may optionally specify a type, which will enforce that the supplies value is compatible with that type before storing it, returning an error if there's a mis-match.
Pro Features slicing syntax
Arrays are sliced by elements, and strings are sliced by graphemes.
Pro Easy to learn
The entire Rust ecosystem is known for having excellent, modern documentation, and Ion is no exception. Couple that with it having far less cruft (ie fewer things to learn) some syntactic and conceptual inspiration from Rust, and suddenly you have a very easy to learn (and still very powerful) shell.
Pro Distinguishes between arrays and strings
Generally more type-safe, enabling explicitness, and allowing for powerful slicing and method syntax.
Pro Faster than all other system shells
Ion actually manages to be faster than Dash -- simultaneously using less memory and packing much more functionality.
Pro A simple, modern, and clean syntax
Syntax is much simpler than other shells, leading to very elegant and succinct scripts and command invocations.
Pro Written in Rust
Shells written in C are often riddled with memory-based vulnerabilities that lead to high profile security flaws that are continually discovered decades later. GNU Bash's Shellshock vulnerability, for example, is an example of a vulnerability that Rust prevents. Rust raises the bar for minimum code quality standards by enforcing various restrictions on type/variable usage, and therefore Ion provides a high quality code base from the start.
Pro Can be compiled as a static binary
There are no dependencies on C or C libraries (except for the minimum required to run on Linux). By opting for the MUSL target toolchain, a fully static binary can be generated and distributed to systems.
Pro Color namespace with 24-bit color syntax
It is exceptionally easy to use 24-bit colors in the shell with Ion's c/color namespace.
echo ${c::0x09F}Bluish text${c::0x630bg}with a brownish background${c::reset}
Pro Method syntax enables a new level of capabilities
Offers a unique concept of string and array methods, whereby invoking the name of a method, and supplying arguments to it, you can perform otherwise complex text manipulation at expansion time. Also supports recursively processing the results of method expansions within method expansions.
Pro Supports a namespaces concept
A special syntax allows for obtaining values from within special namespaces -- either namespaces that are built into the shell, such as the color namespace, or from plugins, such as the git plugin.
Pro Supports a plugin architecture
Plugins may be integrated within Ion using a C FFI. These plugins can add additional methods and namespaces.
Pro May be used as a library
Ion shell is featured within the distributed Concurr application, by the same author of Ion, which creates embedded instances of the Ion shell in the server for executing commands locally.
Cons
Con Doesn't support all bash features
Dash does not support all bash features, sometimes called 'bashisms' unless explicitly pointed at /bin/sh
.
Con Still in development
There's a number of paper cuts that have yet to be addressed. It's been progressing very rapidly though. Some features have yet to be implemented, some logic bugs have yet to be fixed, and it's not been tested much in the wild. Very early in it's life as of 2017.
Con Unubiquitous
There's a big advantage to picking a shell which is ubiquitous, since you are likely to work with more than your own systems, and likely want the same or a similar experience there.