- Rust Quick Start Guide
- Daniel Arbuckle
- 163字
- 2021-06-10 19:46:04
Expressions
The instructions that tell the computer to do something in a Rust program are almost all expressions. An expression tells the computer how to compute a particular value, and produces that value as its result. In math, 2 + 2 is an expression with a resulting value of 4. Similarly, (2 + 2) - 1 is an expression with a resulting value of 3, which is itself made up of an addition expression and a subtraction expression. In Rust, the same basic idea applies: expressions tell the computer how to find a value, and they can be combined together, because using an expression that produces a value has the same result as using that value directly, just as writing (2 + 2) - 1 has the same result as writing 4 - 1.
Not all expressions in Rust look like math, though. Rust is a programming language, not just a calculator. It's the idea of expressions, which combine values to produce new values, that matters.
- 多媒體CAI課件設(shè)計(jì)與制作導(dǎo)論(第二版)
- Photoshop智能手機(jī)APP UI設(shè)計(jì)之道
- Docker進(jìn)階與實(shí)戰(zhàn)
- AWS Serverless架構(gòu):使用AWS從傳統(tǒng)部署方式向Serverless架構(gòu)遷移
- Twilio Best Practices
- React Native Cookbook
- jQuery EasyUI網(wǎng)站開發(fā)實(shí)戰(zhàn)
- Vue.js 3.0源碼解析(微課視頻版)
- Python高級(jí)機(jī)器學(xué)習(xí)
- 人人都懂設(shè)計(jì)模式:從生活中領(lǐng)悟設(shè)計(jì)模式(Python實(shí)現(xiàn))
- Reactive Android Programming
- RabbitMQ Cookbook
- HTML5 APP開發(fā)從入門到精通(微課精編版)
- Developing SSRS Reports for Dynamics AX
- Building Serverless Web Applications