- Rust Programming Cookbook
- Claus Matzinger
- 165字
- 2021-06-24 12:27:43
How it works...
Although not vastly different from many languages' control statements, the basic constructs in Rust can change the way you think about variable assignments. It certainly transformed our mental models to be more data-focused. This means that instead of thinking if this condition is reached, assign this other value to a variable, a reversed assign this other value to a variable if this condition is reached—or shorter transform this variable if this condition applies—may take over.
This is the functional stream in the Rust programming language and it lends itself well to shortening and focusing the important parts of a piece of code. Similar implications can be made from the loop constructs since everything is a scope and has a return value. Using these capabilities will make every program a lot more readable and shorter, especially if it's just simple operations.
We've successfully learned how to control execution flow. Now, let's move on to the next recipe.
- Python量化投資指南:基礎、數據與實戰(zhàn)
- 深入淺出Spring Boot 2.x
- Python程序設計(第3版)
- Java程序設計與實踐教程(第2版)
- Kotlin從基礎到實戰(zhàn)
- Instant Ext.NET Application Development
- Android項目實戰(zhàn):手機安全衛(wèi)士開發(fā)案例解析
- Greenplum構建實時數據倉庫實踐
- Android熱門應用開發(fā)詳解
- 匯編語言程序設計教程
- ASP.NET開發(fā)技巧精講
- Python3網絡爬蟲寶典
- Getting Started with SpriteKit
- Spring Boot實戰(zhàn):從0開始動手搭建企業(yè)級項目
- Unreal Engine 4 Scripting with C++ Cookbook