TWiR quote of the week

H2CO3 on whether Rust is an OOP language:

Rust is…

…a language whose main goal and promise is to bring compile-time-proven memory safety and thread safety together with runtime performance, ideally without compromising either;
…which is achieved via a unique combination of half-century-old and novel good ideas from the history of programming language design; drawing heavily on
…interface-/protocol-/typeclass-/trait-/whatever-you-call-it- based programming complementing real, parametric polymorphism aka "generics" aka "type-level functions";
…making the strong static typing easier to digest for the programmer via extensive and smart type inference;
…mixing in the basics of algebraic type systems found in traditional statically-typed so-called functional languages, such as Haskell and its family;
…as well as the superb pattern matching abilities of said languages;
…allowing as syntactic sugar for function calls what many consider "THE object-oriented syntax";
…although the latter was never the essence of object-oriented programming – according to some, myself included, it is instead encapsulation, which Rust also provides via the simple concept of visibility modifiers;
…while it also cleverly manages mutable state, allowing for the so-called procedural-imperative paradigm to be embedded into the language without undermining its safety.

@H2CO3 in Is Rust OOP? If not, what is it oriented to??

6 Likes