You've already forked comprehensive-rust
							
							
				mirror of
				https://github.com/google/comprehensive-rust.git
				synced 2025-10-31 08:37:45 +02:00 
			
		
		
		
	Mention ADT and zero-cost abstractions among modern features
This commit is contained in:
		| @@ -7,6 +7,7 @@ Rust is built with all the experience gained in the last 40 years. | |||||||
| * Enums and pattern matching. | * Enums and pattern matching. | ||||||
| * Generics. | * Generics. | ||||||
| * No overhead FFI. | * No overhead FFI. | ||||||
|  | * Zero-cost abstractions. | ||||||
|  |  | ||||||
| ## Tooling | ## Tooling | ||||||
|  |  | ||||||
| @@ -18,6 +19,15 @@ Rust is built with all the experience gained in the last 40 years. | |||||||
|  |  | ||||||
| Key points: | Key points: | ||||||
|  |  | ||||||
|  | * Zero-cost abstractions, similar to C++, means that you don't have to 'pay' | ||||||
|  |   for higher-level programming constructs with memory or CPU. For example, | ||||||
|  |   writing a loop using `for` should result in roughly the same low level | ||||||
|  |   instructions as using the `.iter().fold()` construct. | ||||||
|  |  | ||||||
|  | * It may be worth mentioning that Rust enums are 'Algebraic Data Types', also | ||||||
|  |   known as 'sum types', which allow the type system to express things like | ||||||
|  |   `Option<T>` and `Result<T, E>`. | ||||||
|  |  | ||||||
| * Remind people to read the errors --- many developers have gotten used to | * Remind people to read the errors --- many developers have gotten used to | ||||||
|   ignore lengthly compiler output. The Rust compiler is significantly more |   ignore lengthly compiler output. The Rust compiler is significantly more | ||||||
|   talkative than other compilers. It will often provide you with _actionable_ |   talkative than other compilers. It will often provide you with _actionable_ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user