Re:Case Study: Npm uses Rust for its CPU-bound bottlenecks [...
by ndesaulniers on Sunday March 03, 2019 @08:13PM
(#19298082)
> I tried too much to use OOP, which doesn't make any sense and leads to convoluted code.
Oh, well, you don't need Rust for that! :P
Re:Case Study: Npm uses Rust for its CPU-bound bottlenecks [...
by Impossible on Sunday March 03, 2019 @11:10PM
(#19298705)
Yes the same is true with C++ or C# for example, which is were the move out away from OOP and towards DOD/ECS started.
Re:Case Study: Npm uses Rust for its CPU-bound bottlenecks [...
by pjmlp on Monday March 04, 2019 @03:30AM
(#19299672)
Which is ironic, given that people tend to forget that it was C++ which made OOP mainstream, there wasn't any Java or C# back then, two fully OOP based languages.
The other part is that component oriented programming is actually a branch of OOP, from CS point of view, with books published on the subject at the beginning of the century.
"Component Software: Beyond Object-Oriented Programming"
https://www.amazon.com/Component-Software-Beyond-Object-Orie...
First edition uses Component Pascal, Java and C++, with the 2nd edition replacing Component Pascal for C#.
And: it is incredible easy to build and deploy.
I think whether Rust is useful or not depends entirely on the application. If you need high confidence in what the thing is doing, it should run parallel and fast and you are familiar with the concepts Rust is using – it isn't a bad choice. For me it replaced Python in nearly every domain except one-use scripts and scientific stuff.
It can be hard for advanced programmers to abandon certain patterns they bring from other languages though. In the first months I tried too much to use OOP, which doesn't make any sense and leads to convoluted code. If you work more in a compositional and data oriented way while making use of Types and Traits, you will end up with much simpler solutions that work incredibly well.
Katherine West's RustConf 2018 Talk on ECS Systems describes this incredibly well and might be even good to watch if you are never intending to use Rust at all, because the patterns discussed are quite universal: https://www.youtube.com/watch?v=aKLntZcp27M