Rust Brain Teasers: Exercise Your Mind

Wolverson, Herbert

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2022-04-05
  • 定價: $900
  • 售價: 9.0$810
  • 語言: 英文
  • 頁數: 140
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1680509179
  • ISBN-13: 9781680509175
  • 相關分類: Rust 語言
  • 立即出貨 (庫存 < 3)

買這商品的人也買了...

商品描述

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.

商品描述(中文翻譯)

Rust程式語言一貫且盡力避免讓程式設計師感到驚訝。然而,像所有語言一樣,Rust仍然有其特殊之處。但這些特殊之處提供了一個教學機會。在這本書中,您將通過一系列的腦筋急轉彎來挑戰您對Rust的理解。通過了解您知識的不足,您可以在所做的事情上變得更好,並避免錯誤。這本書中的許多腦筋急轉彎都來自作者自己創建軟體的經驗。其他則來自Rust社群中常見的問題。無論它們的來源如何,這些腦筋急轉彎都很有趣,而且說實話:誰不喜歡一個好的謎題呢?

有什麼比通過一系列動態腦筋急轉彎來鍛煉大腦並增加您對Rust程式設計的知識更好的方式呢?當您閱讀這些謎題並試圖找出答案時,您不僅會了解Rust獨特的特點和特異之處,還會在這個過程中玩得開心。

立即開始,使用示例程式碼和涵蓋數字和文字、陰影和記憶等各種問題的樣本問題。試著弄清楚為什麼特定的程式無法編譯,為什麼會產生意外的輸出,或者為什麼會因為錯誤訊息而發生崩潰。在執行程式並閱讀答案之後,就該深入核心問題並進行詳細解釋了。了解為什麼程式會產生特定的結果,並發現類似問題可能如何影響您在自己的程式中編寫的程式碼,甚至在生產環境中。這些挑戰來自Rust社群中引人入勝的討論、現實世界的問題,甚至是讀者的反饋,肯定會讓您感到驚訝、啟發和娛樂。

您準備好以前所未有的方式體驗Rust了嗎?那就磨練您的大腦,準備迎接挑戰吧!

您需要什麼:

本書假設您對Rust程式語言有一些了解。要解決本書中的腦筋急轉彎,您需要在任何平台上擁有一個運作正常的Rust環境。您可以通過訪問https://rustup.rs/來安裝Rust。您還需要一個文本編輯器或支援Rust的IDE。