News for hackers. Stuff that matters.
Re:Announcing Rust 1.20 by nicoburns on Friday September 01, 2017 @11:35AM (#15149336)
I'd argue that Rust is pretty close to being "javascript school" OOP, except with the addition of strong typing.

JavaScript code bases use a lot of classes, but while JavaScript supports inheritance, it's use isn't particularly idiomatic. What is idiomatic is duck typing (checking for the presence of method or property on an object). This is basically the same as using traits, except without compile time correctness guarantee. You even have things like `Symbol.iterator`[0], which allow an arbitrary object to work with a `for..of` loop, exactly like `impl Iterator` in Rust.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

There are no comments on this comment yet.