Actionscript vs Rust
When comparing Actionscript vs Rust, the Slant community recommends Rust for most people. In the question“What is the best programming language to learn first?” Rust is ranked 21st while Actionscript is ranked 77th. The most important reason people chose Rust is:
Since Rust is statically typed, you can catch multiple errors during compile time. This is extremely helpful with debugging, especially compared with dynamically typed languages that may fail silently during runtime.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Great for light games
Easy 2D and rich 3D capabilities means ActionScript is a great game prototyping or production tool. Relatively easy to get images on a stage and easy to share with it's wide platform support.
Pro Wide compatability
Runs on all major platforms as an AIR executable or mobile app, as well as in-browser as a FLASH file.
Pro Object-oriented
Teaches strong typed habits and follows many conventions of major programming languages.
Pro Large community
Online games and a colorful history means there are a lot of existing scripts and examples on the internet for available integration as well as tutorials.
Pro Catch errors at compile-time
Since Rust is statically typed, you can catch multiple errors during compile time. This is extremely helpful with debugging, especially compared with dynamically typed languages that may fail silently during runtime.
Pro Compiles to machine code allowing for extra efficiency
Rust uses LLVM as a backend, among other things this allows Rust code to compile down to machine languages. This allows developers to write programs that run as efficiently as possible.
Pro Threads without data races
Unique ownership system guarantees a mutable data to be owned and mutated by only one thread at a time, so there's no data race, and this guarantee is checked at compile time statically. Which means easy multi-threading.
Of course, immutable data can be shared among multiple threads freely.
Pro Generics support
You don't have to write same array and dictionary classes hundreds and thousands times for strong type check by compiler.
Pro Built-in concurrency
Rust has built-in support for concurrency.
Pro Supports cross compilation for different architectures
Since Rust 1.8 you can install additional versions of the standard library for different targets using rustup/multirust
.
For example:
$ rustup target add x86_64-unknown-linux-musl
Which then allows for:
$ cargo build --target x86_64-unknown-linux-musl
Pro Makes developers write optimal code
Rust is a modern programming language written around systems. It was designed from the ground up this way. It's language design makes developers write optimal code almost all the time, meaning you don't have to fully know and understand the compiler's source code in order to optimize your program.
Furthermore, Rust does not copy from memory unnecessarily, to give an example: all types move by default and not copy. Even references to types do not copy by default. In other words, setting a reference to another reference destroys the original one unless it's stated otherwise.
Pro Support for macros
When you identify a part of your code which gets repeated often, which you cannot abstract using functions or classes, you can use Rust's built-in Macros.
Pro Official package manager and build tool
Cargo is the official package manager for Rust. It comes with the language and downloads dependencies, compiles packages, and makes and uploads distributable packages
Pro Easy to write understandable code
While not as verbose as Java, it still is much more verbose than languages like Go and Python. This means that the code is very explicit and easy to understand.
Pro Big community
The biggest community contributing to language.
Pro Functional programming
Very easy to create functional with some additional from structure application.
Pro Excellent syntax
Pro Safety
Pro No GC
Pro Low memory usage
Pro Static compiled & statically linked single file output
Pro Extremely fast code execution
Pro Zero-cost futures or Async IO
Cons
Con No future
The last stable release is : 3.0 / June 27, 2006. Adobe confirmed there will be no 4.0, ever. This train has stopped long time ago.
Con Not very widely used
Past its hay-day, ActionScript is reserved for more niche products. This in turn means that choosing ActionScript as a career path is often ill-advised. Exceptions include ScaleForm for UI/UX in games (including AAA games) and light apps and games.
Con Waning support
Un-usable in-browser on most mobile devices, ActionScript is used mainly for niche AIR programs, graphical mobile and in-browser apps and games, and in UI/UX using Scaleform.
Con Long compile times
Way longer to compile than other languages.
Con Low productivity
The compiler is strict, such as ownership and borrowing checkers.
Con Low readability
Harder to read and understand language.
Con Very ugly and verbose syntax
Compared to many languages. One tool needed to be productive is the language to be pleasing and effective, yet Rust friction is as high as its safety.
Con Steep learning curve
Pretty strict and hard to adapt for beginners.
Con Not as useful or productive as advertised.
If really out here wanting to use something besides C/C++, in 98% of use cases, would do just as well or be better off using something other than Rust. Will complete the project faster, would be easier, will be happier, and nearly as safe (use newer language with optional GC).
Con Rust not as safe as it pretends to be
Rust problems:
1) Massive undisclosed usage of unsafe.
2) Massive amounts of memory safety CVEs - see details.
3) Large bloated Rust binaries increase attack surface for exploits.
4) Many corporate types claiming Rust is safe, don't actually program or use it (have some quiet financial interest to push it).
Con Significant time required to understand the language fully
There's the infamous borrow checker for example.
Con Low-level programming language
This means that it encourages the programmer to be very careful in terms of how memory is allocated, etc.
Most applications can run without exceeding the capacity of the server, even with an inefficient dynamic scripting language.