RUST BASICS

This is the first post of Learning Rust series. Also now, you can read the same content via learning-rust.github.io 👈 . I think it’s more structured and easy to see the big picture.

Why Rust?

Things started in 2007–2009, in my final years at the university. I chose a web based project for the final year project submissions, while my friends chosen Java Native Application projects. And that is how I became a web developer.

I chose web because at that time I truly believed, web will be the next Ultimate, System Independent & Language Independent platform and the next generation software ecosystem will be implemented top of browsers. The web I expected is sort of similar to this.

But things were changed because of Apple. This is how it tells in Wikipedia.

In 2007, Apple Computer launched the iPhone1.0 the company’s first ever smartphone. When the device launched, the device did not provide any support for third-party software: Apple’s CEO Steve Jobs believed that web apps served over the internet could provide adequate functionality required for most users. Soon after its release, however, developers had managed to “jailbreak” the iPhone and begin coding third-party apps for the device, distributed through package managers such as Installer.app (which itself was based on APT) and Cydia. With the release of iPhone OS 2.0 in July 2008, Apple launched the App Store; officially introducing third-party app development and distribution to the platform.

Android copied Apple. Both created new ways to generate extra revenue via their Closed Mobile App Ecosystems. They provided better ways to write native apps instead of web apps. But we had a hope with Facebook.

Web apps were centered around Facebook. Also Facebook chose HTML5 to build their mobile apps. When Rockmelt came, I was thrilled. If Facebook acquired Rockmelt and officially announced it via Facebook, It could be next the Chrome OS. But Mark Zuckerberg didn’t think that way. Smartphone user base was grown rapidly. HTML5 couldn’t compete with native apps in the closed mobile ecosystems of Apple and Google. Facebook ditches HTML5.

“The biggest mistake we made as a company was betting too much on HTML5 as opposed to native”

__ Mark Zuckerberg

OK, back to my story. I’m a PHP developer but past 3–4 years I was more concerned about HTML5, CSS3, RWD, UI/UX because I also bet on HTML5 over native apps. It’s true that web technologies are slowly adapting for native app development via asmjs, NativeScript, Electron, WebAssembly, React Native but future web application development will be more complex because of Emerging Connected Cars and VR Ecosystems.

On the other hand C++, Go like programming languages are adapting for web development to build performant web apps and PHP is becoming a dying language. So learning a systems programming language is much wiser in these days. We have many trending languages like JavaScript, Julia, Go, Rust, Swift but explaining the pros and cons of each language is beyond the purpose of this article. I chose Rust and it caught my interest at the first sight.