
Rust Brain Teasers
Beschreibung
The Rust programming language is consistent and does its best to avoid surprising the programmer. Like all languages, though, Rust still has its quirks. But these quirks present a teaching opportunity. In this book, you''ll work through a series of brain teasers that will challenge your understanding of Rust. By understanding the gaps in your knowledge, you can become better at what you do and avoid mistakes. Many of the teasers in this book come from the author''s own experience creating software. Others derive from commonly asked questions in the Rust community. Regardless of their origin, these brain teasers are fun, and let''s face it: who doesn''t love a good puzzle, right?
What better way to exercise your brain and increase your Rust programming knowledge than with a collection of dynamic brain teasers? As you read through each of these puzzles and try to work out the answers, you''ll not only learn about Rust''s unique quirks and peculiarities, you''ll also have loads of fun along the way.
Dive right in and get started with example code and sample problems that cover numbers and text, shadowing and memory, and everything in between. Try to figure out why a particular program won''t compile, why it produces unexpected output, or why it panics and terminates with an error message. Once you''ve run the code and read the answer, it''s time to get to the heart of the matter with a detailed explanation. Learn why a program produced the result it did, and discover how similar issues might affect the code you write in your own programs, even in production. Sourced from engaging discussions within the Rust community, real-world problems, and even reader feedback, these challenges will certainly surprise, enlighten, and entertain you.
Are you ready to experience Rust like never before? Then sharpen your brain and get ready for a challenge!
What You Need:
This book assumes you have some knowledge of the Rust programming language. To work through the brain teasers in this book, you''ll need a working Rust environment on any platform. You can install Rust by visiting https://rustup.rs/. You''ll also need a text editor or Rust-friendly IDE.
Weitere Details
Weitere Ausgaben
Inhalt
- Cover
- Table of Contents
- Acknowledgments
- Preface
- About the Author
- About the Code
- About You
- Keep an Open Mind
- Part I-Rust Brain Teasers
- Puzzle 1. Three and a Bit
- Puzzle 2. Non-standard Input
- Puzzle 3. Type Conversion
- Puzzle 4. Byte-Sized Chunks
- Puzzle 5. How Long Is a String?
- Puzzle 6. Please Reboot the Universe
- Puzzle 7. There and Back Again
- Puzzle 8. Walks Like a Duck, Quacks Like a Duck
- Puzzle 9. Out of Order
- Puzzle 10. X Marks the Spot
- Puzzle 11. Stacking Boxes
- Puzzle 12. Amnesia
- Puzzle 13. Reverse the Polarity of the Neutron Flow
- Puzzle 14. Structure Sizing
- Puzzle 15. To Infinity
- Puzzle 16. Double or Nothing
- Puzzle 17. How Long Is a Vector?
- Puzzle 18. Mutable Immutables
- Puzzle 19. Sleepless in Tokio
- Puzzle 20. Hello, Bonjour
- Puzzle 21. Tying a Gordian Knot
- Puzzle 22. Waiting for Godot
- Puzzle 23. Constant Loops
- Puzzle 24. Home on the Range
- Bibliography
- Index
- - SYMBOLS -
- - A -
- - B -
- - C -
- - D -
- - E -
- - F -
- - G -
- - H -
- - I -
- - J -
- - L -
- - M -
- - N -
- - O -
- - P -
- - R -
- - S -
- - T -
- - U -
- - V -
- - W -
Systemvoraussetzungen
Dateiformat: PDF
Kopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
- Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
- Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions oder die App PocketBook (siehe E-Book Hilfe).
- E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat PDF zeigt auf jeder Hardware eine Buchseite stets identisch an. Daher ist eine PDF auch für ein komplexes Layout geeignet, wie es bei Lehr- und Fachbüchern verwendet wird (Bilder, Tabellen, Spalten, Fußnoten). Bei kleinen Displays von E-Readern oder Smartphones sind PDF leider eher nervig, weil zu viel Scrollen notwendig ist.
Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.
Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.