Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Recommended reading for everyone that doesn't get how traits are just yet another kind of OOP.

"Component Software: Beyond Object-Oriented Programming"

https://www.amazon.de/-/en/Clemens-Szyperski/dp/0201745720

"Authoring ActiveX with VB 6"

https://learn.microsoft.com/en-us/previous-versions/visualst...

"Traits - Composable Units of Behavior"

https://scg.unibe.ch/research/traits

"Working with Protocols"

https://developer.apple.com/library/archive/documentation/Co...



Thanks for the links.

Container. Component. Context. Graph. I would think a "wonderful language" such as Rust should have no problem with such a basic conceptual setup, but apparently not. I personally am solidly in the adaptive components camp, specially for things like UI.

If you know Rust (I don't), curious if the monadic approach could work, propagating the state as a parameter.


to that point, traits themselves originated first in smalltalk correct??


Not originally, but they were added after Smalltalk-80, one of the links above has the related paper.

They exist now in Squeak and Pharo, both originally based on Xerox's Smalltalk-80 image.


That's quite weird. These traits don't look like rust's traits, which really are a port of typeclasses from Haskell. I think the section about scala illustrates this well because scala's "traits" are an OO construct, but now scala 3 also" has typeclasses. So... Rust still isn't OO.


Ah, trying to go down that route?

ECOOP 2009 proceedings paper from a certain Simon Peyton Jones.

"Classes, Jim, But Not as We Know Them — Type Classes in Haskell: What, Why, and Whither"

https://link.springer.com/chapter/10.1007/978-3-642-03013-0_...


Sadly it's paywalled. Care to enlighten me? If inspiration came from smalltalk and not prolog then great, you win.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: