May 2019
Intermediate to advanced
698 pages
17h 21m
English
While mainstream languages differentiate between numeric primitives such as an integer, a double, and a byte, a lot of newer languages such as Golang have started adding distinction between signed and unsigned numeric types too. Rust follows in the same footsteps by distinguishing signed and unsigned numeric types, providing them as separate types altogether. From a type-checking perspective, this adds another layer of safety to our programs. This allows us to write code that exactly specifies its requirements. For example, consider a database connection pool struct:
struct ConnectionPool { pool_count: usize}
For languages that provide a common integer type that incorporates both signed and ...
Read now
Unlock full access