Rust
December 06, 2020Rust is a system language. Compiles to binary. It has small runtime. The specialty is that is solves concurrency easily. Concurrency is solved by having a lot of rules as to who can access what. Also there is memory safety without a garbage collectors. These are all safety things. Safety in the sense, you can’t make bugs. Bugs are identified at compile time using static analysis. It has also a lot of good functional language features. Immutability is the default. Mutability has to he explicit. Cool closure syntax. I also like the function syntax. There is a full type system. Traits are also there. What is a trait? It is like an interface. But you can put use in there somewhere and they are all added. Drop and Send are some of the traits. Structs are also there. You build types from types. There also the variables can have reference types or value types. The ownership thing is cool. Whenever something is passed to another scope, its ownership changes. It can’t be accessed anymore from the old scope. When one scope finishes the things that thing owns are removed. This code is added by compiler, I suppose. There are references. When an alias is given then that is a reference. When there are references active, things can’t be changed. Also only one mutable reference can exist. The two ways of concurrency is shared data and message passing. When doing message passing also we do ownership change. Ownership is for structs. Things in the scope. Vector seems to be the common collection type. There are wrappers like mutex, which is a lock. We also have channels. Creating channels give us