4 ms·
I don't know how this relates to the creator of Rust or its actual origin story, but Mozilla has been trying to get many of the same results out of C++ for a lo
by tmzt 9y ago
I don't know how this relates to the creator of Rust or its actual origin story, but Mozilla has been trying to get many of the same results out of C++ for a long time. You can look at the evolution of smart pointers in the codebase, along with more formal ways of representing error return codes (borrowed from MS COM), and general good practices.
It seems at some point they became aware of how unsuited C++ is for parallel processing, and how important it would be for browsers in the future. Even compartmentalization or running tabs in their own process is a form of parallelization. This requires an efficient way of sharing memory and preventing race conditions and errant writes, as well as a way to protect these processes from cross-site scripting attacks, buffer over- and underruns, etc.
Computing hardware has also moved on from the CPU-centric world and the gains in battery life from dedicated GPU hardware being used even for rendering tasks, and now for font processing and other things were too good to pass up.
I'm a long time follower of Mozilla's development, and extremely excited about what's happening with Firefox.
(I'm also currently a Chrome user, leaving in large part due to profile corruption issues and inferior built-in development tools. I hope to be able to run Firefox and WebRender on both Ubuntu and Windows.)
- abiox 9y ago> (borrowed from MS COM) are you referring to microsoft's com (component object model)?
- tmzt 9y agoYes, though more to HRESULTS from the Windows API. This meant return values could indicate success or a specific error which could be determined with macros. Rust actually has a similar mechanism in its standard lib, the Result enum whuch resembles Maybe from Haskell, but has either a returned value if successful (which can be the empty object ()) or an Error. XPCOM was modeled on the Microsoft version using the same vtable tricks that it used to enable dynamic dispatch through interfaces.
- steveklabnik 9y agoSmall note, Option in Rust is Maybe in Haskell, Result in Rust is Either in Haskell.