Rust is a fairly new programming language with the goal of being a safe systems programming language. “Safe” means code generated by Rust is free of memory access and data race vulnerabilities. System programming language means that Rust programs are fast and able to use platform resources.
This 5-part video series entitled Rust Models by Dr. James Fawcett, describes different conceptual models that underlie the Rust programming language. Discussion with exemplars is used to illustrate how the models describe aspects of the language for effective use. In this series, five core fundamental models are presented:
- Type Safety
- Ownership
- Object Model
- Generics
- Code Structure
This video discusses the Rust Object model and language facilities for representing user-defined types. Rust does not have support for classes, but does provide structs, which are similar to classes used in other object-oriented languages like C++. “Traits” are similar to interfaces or abstract classes and support polymorphic operations. Rust provides encapsulation of data members and access control through the use of the “pub” keyword which specifies whether members of a struct are accessible to clients.
Leave a Comment
You must be logged in to post a comment.