Advanced

Advanced Types in Rust are quite helpful

Reading Time: 3 minutes In this blog, we will discuss the advanced types available in Rust. Creating Type Synonyms with Type Aliases Rust provides the ability to declare a type alias to give an existing type another name. For this, we use the type keyword. For example, we can create the alias Kilometers to i32 like so:  Values that have the type Kilometers will be treated the same as values of type i32: Because Kilometers and i32 are the same type, we can add Continue Reading

And You Thought Option is Just Another Way to Handle null

Reading Time: 4 minutes Ok, to start with, the recommendation is to use None instead of null. Ideally if in Scala code, we end up getting a NPE then that is sin! Well at least at Knoldus 🙂 null in Java is used as a placeholder for denoting no value or a non-fatal error situation. It is widely accepted as a Billion dollar mistake of Java. The way to Continue Reading