• Complain

Nate Murray - Fullstack Rust

Here you can read online Nate Murray - Fullstack Rust full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2020, publisher: leanpub.com, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

No cover

Fullstack Rust: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Fullstack Rust" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Nate Murray: author's other books


Who wrote Fullstack Rust? Find out the surname, the name of the author of the book and a list of all author's works by series.

Fullstack Rust — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Fullstack Rust" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Fullstack Rust Nate Murray This book is for sale at - photo 1
Fullstack Rust
Nate Murray

This book is for sale at http://leanpub.com/fullstackrust

This version was published on 2020-02-18

This is a Leanpub book Leanpub empowers authors and publishers with - photo 2

* * * * *

This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.

* * * * *

2019 - 2020 Nate Murray
Book Revision

Revision 4 - First Edition - 2020-02-19

Join Our Discord

Come chat with other readers of the book in the official newline Discord channel:

Join here: https://newline.co/discord/rust

Bug Reports

If youd like to report any bugs, typos, or suggestions just email us at: us@fullstack.io.

Be notified of updates via Twitter

If youd like to be notified of updates to the book on Twitter, follow us at @fullstackio.

Wed love to hear from you!

Did you like the book? Did you find it helpful? Wed love to add your face to our list of testimonials on the website! Email us at: .

Introduction

There are numerous reasons to be hopeful about the future of computing, one of which is the existence and continued progression of the Rust programming language.

We are currently in the fifth era of programming language evolution. This is an era where languages have been able to take all of the learnings since the 1950s and incorporate the best parts into languages each with its own cohesive vision.

We have specialized languages cropping up for a wide variety of tasks and countless general purpose languages being actively developed and used. There are significant resources in industry to invest in language design and development which compliment the vibrant academic community. With tools like LLVM and the explosion of open source, creating a language has never been easier.

It is in this environment that Rust has been voted the most loved programming language in the Stack Overflow Developer Survey every year since 2016. Standing out in this increasingly crowded world of languages is enough of a reason to ask why Rust?

Why Rust?

There are a few potential readings of this question: why should I learn Rust, why are others using Rust, why should I choose Rust over language X? These are all relevant, but I want to start with a bit of a philosophical argument for Rust independent of these specific points.

There is a limit to how transformative an experience you can have when learning a language in a similar paradigm to one you already know. Every language and paradigm has an intrinsic style that is forced on you as you try to solve problems.

If you work within that style then your code will flow naturally and the language will feel like it is working with you. On the other hand, if you fight the natural style of the language you will find it hard or impossible to express your ideas.

Moreover, learning and working with a language will teach you ways to be more effective based on how the language guides you based on its natural design. How much you are able to learn is a function of how much your prior experience and mental models cover the new language.

Rust borrows a lot of ideas from other languages and is truly multi-paradigm, meaning you can write mostly functional code or mostly imperative code and still fit nicely within the language. The most unique feature of the language, the borrow checker, is a system that enforces certain invariants which allow you to make certain safety guarantees. Even this is built on prior art found in earlier languages.

All of these good ideas from the world of programming language design combine in a unique way to make Rust a language that truly makes you think about writing code from a novel perspective. It does not matter how much experience you have, learning Rust will forever change the way you write code for the better.

Okay with that philosophical argument out of the way, lets dig in to some specifics of why Rust is a exciting.

To help guide this discussion, we can break things down into a few broad categories.

On language comparisons

There is no best programming language. Almost every task has a variety of languages which could be the right tool. Every language comes with good parts and bad parts. Evaluating these trade-offs when faced with a particular problem space is an art unto itself. Therefore, nothing in this book is intended to disparage or denigrate any particular alternative language. The primary goal of this book is to faithfully present Rust. That being said, sometimes comparisons with other languages are instructive and are meant to be instructive rather than as fuel in a flame war.

Language features

There are a lot of features of Rust which make it a great tool for a great number of tasks. Some highlights include:

  • Performance
  • Strong, static, expressive type system
  • Great error messages
  • Modern generics
  • Memory safety
  • Fearless concurrency
  • Cross platform
  • C interoperability

Lets briefly go through some of these which are probably the biggest reasons that Rust gets talked about.

Performance

Rust is exceptionally fast, in the same ballpark as C and C++. For some programs, specifically due to the lack of pointer aliasing, the Rust compiler can sometimes have enough information to optimize code to be faster than what is possible in C without directly writing assembly. For the vast majority of use cases, you should consider Rust to be fast enough.

Often the most obvious way to write a program is also the fastest. Part of this comes from the commitment to zero-cost abstractions, which are summarized by Bjarne Stroustrup, the creator of C++, as:

What you dont use, you dont pay for. And further: What you do use, you couldnt hand code any better.

Most of the abstractions in Rust, for example iterators, are zero-cost by this definition. The most efficient way to traverse a vector of data is to use a for loop which uses an iterator trait. The generated assembly is usually as good as you could hope for had you written it by hand.

The other aspect of performance is memory consumption. Rust does not have a garbage collector so you can use exactly as much memory as is strictly necessary at any given time. Due to the design of the language, you start to think and see every memory allocation. Using less memory is often easier than the converse. The rest of the language is designed around making working without a garbage collector painless.

Type system

The type system of Rust is influenced by the long lineage of functional programming languages such as ML and Haskell. It is static, nominal, strong, and for the most part inferred. Dont worry if that didnt mean anything to you, but if it did then great. You encode the ideas and constraints of your problem with types. You only have to specify types in a few places with the rest able to be inferred. The compiler then checks everything for you so that you get faster feedback about potential problems. Entire classes of bugs are impossible because of static typing. Most things you encounter in practice are expressible in the type system. The compiler then checks everything for you so that you get faster feedback about potential problems. Entire classes of bugs are impossible because of static typing.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Fullstack Rust»

Look at similar books to Fullstack Rust. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Fullstack Rust»

Discussion, reviews of the book Fullstack Rust and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.