#Issue142
2 posts

Rust Lang in a nutshell

StackOverflow's developer surveys have shows Rust to be the most loved language in the last couple of years. Infact, Deno is written in Rust!
Read more

Rust Lang in a nutshell

StackOverflow's developer surveys have shows Rust to be the most loved language in the last couple of years. Infact, Deno is written in Rust! Here's why:

  • Rust is a statically typed but intelligent enough to decipher types of variables where they aren't explicitly typed.

  • Immutable variables by default. This ensures that data cannot be changed by functions unless you specially mark the variable as such.

  • Ownership and borrowing of variables is the most important concept in Rust. It's also what leads to a higher learning curve. Each value is "owned" by the variable that is destroyed when it goes out of scope.

  • When a new variable is assigned to the old one, the old reference is destroyed. Let's take a look at an example

    let s1 = "Hello world".to_string();
    let s2 = s1;
    

    s1 will cease to exist. The value of s1 gets transferred to s2.

  • A variable can also borrow the value from the owner. Borrowing is simply a pointer reference to the original data. Strict rules govern this act. For example, the borrower cannot outlive the owner in scope.

  • While this concept is a little weird, it prevents null pointer exceptions, dangling pointers and buffer overflows.

Given it's type safety and emphasis on data security, I think Rust will be the language to look out for in the next 5 years, or till another language is invented to take it's place.

Full Post here, 20 mins read

What is Deno and will it Replace NodeJS?

For the past 2 years, Ryan Dahl has been speaking about the shortcomings of NodeJS. He is now attempting to resolve those problems with NodeJS.
Read more

What is Deno and will it Replace NodeJS?

JS Programming Language
Courtesy: Toggl

For the past 2 years, Ryan Dahl has been speaking about the shortcomings of NodeJS. He is now attempting to resolve those problems with NodeJS. Let's take a look at some of the promises made by Deno:

  • Security is integrated into the language. Via CLI arguments you can enable/disable access to a filesystem or network resources to a Deno script. This is a huge boon for operations folks.
  • Unlike NodeJS, the standard library for Deno is more featureful and works well independently. You only require dependencies for complex tasks.
  • Typescript is a first-class citizen and requires no extra tooling for it to work in Deno. No more tranpilation!
  • Bid farwell to node_modules/. To me, this is the biggest advantage of Deno. All dependencies are part of the binary itself and don't require an external folder as a cache.
  • Better tooling all around. An improved debugger (which is essential), test runner and file watcher are just a few of the things.

This is an exciting new development in the programming world. We are all looking forward to see how Deno performs against real-world production use-cases.

Full Post here, 6 mins read