4 ms·
Does anyone know of a good reference for idiomatic OO(P)? Like the Codd paper for Relational Algebra.
by heinrichhartman 8y ago
Does anyone know of a good reference for idiomatic OO(P)?
Like the Codd paper for Relational Algebra.
- arendtio 8y agoIf you use a typical IDE that comes with Squeak or VisualWorks, you can quickly inspect a lot of idiomatic code from the standard library. The most common mistake I have seen is that people who know about other programming languages, start looking at OOP as a way to separate and organize code. Instead, it starts from the other side: OOP is based on a few core concepts, and those concepts are critical to understanding OOP. The first concept is 'Everything is an object', the second might be 'Objects can receive messages'. So if you have some code: 1 + 2 It means that there is an object '1' which receives a message '+ 2'. If '1' is an Integer, Float, String or whatever might be relevant for its inner workings but if you want to understand OOP you first have to understand the concept-side of it (and ignore the implementation). Once you know the concepts, you can reason about good and bad implementation/code. You might wonder about the preachy tone, but in the beginning, it took me a few months before I understood that I was trying to understand OOP from the wrong side (at the time I was thinking in C) and I would like others to have a quicker start than I had.
- heinrichhartman 8y agoThanks for your reply. Where would you go to "to understand the concept-side of it" better? I am reasonably fluent in Java and Python, and read a lot of C/C++. So I think I have a solid understanding what OO looks like, and what concepts are involved (dynamic dispatch, polymorphism, inheritance, etc). However, there is a lot of critique about the OO models in these languages and code that is found in the wild. What I am looking for is a principled treatment, that avoids these pitfalls.
- arendtio 8y agoThe professor who taught me OOP wrote a book which I never read, but I am confident that he focuses on the concepts in the beginning: https://books.google.de/books?id=RAloBgAAQBAJ&printsec=frontcover&hl=de#v=onepage&q&f=false https://books.google.de/books?id=RAloBgAAQBAJ&printsec=front... Another good source of ebooks seems to be this page: http://stephane.ducasse.free.fr/FreeBooks/ http://stephane.ducasse.free.fr/FreeBooks/ There you can find the Blue-Book which looks like a great resource too: http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.... Some Links seem to be broken nowadays, but some content can be obtained from the archive: https://web.archive.org/web/20130319110836/http://stephane.ducasse.free.fr:80/FreeBooks/SmalltalkDesignPatternCompanion/ https://web.archive.org/web/20130319110836/http://stephane.d...
- mikmoila 8y agoThere is a paper by Stroustrup et al titled something like "Idiomatic C++". Check out the books by Andrew Koenig (especially "Ruminations on C++") and Bertrand Meyers.
- noblethrasher 8y agoWell, the best analogue to the Codd's relational algebra is Hewitt's actor model in my professional opinion. Both are based on mathematical formalism, though the Actor Model goes a bit further in that it's also informed by physics. But, just as SQL doesn't really implement Codd's relational algebra, so it is the case that most so-called OOP languages miss the mark vis-à-vis Alan Kay's original conception. The analogy is buttressed by the fact that many early RDBMSs didn't even support joins (path independence being an essential characteristic of RA), just as many mainstream OOP languages didn't/don't idiomatically endow objects with a strong way to protect themselves (encapsulation being a necessary characteristic, thus pervasive use of setters being the main sin)). But, Kay did praise Erlang for getting OOP right.
- da02 8y agoKay also mentioned the Internet is an OO system. At one point he was thinking every object would have it's own IP address. He does have an account here on HN. https://news.ycombinator.com/threads?id=alankay1 https://news.ycombinator.com/threads?id=alankay1 I hope he doesn't get tired of explaining the same things over-and-over again. I have asked questions and he has answered, but I usually end up misinterpreting the ideas. :(
- noblethrasher 8y agoYep, I follow him pretty closely, and knew about his account and comments on here. Funny story: That is at least the second account that he created on HN. He registered an earlier one just to reply to a comment that I had made[1]. [1]: https://news.ycombinator.com/threads?id=alanone1 https://news.ycombinator.com/threads?id=alanone1
- da02 8y agoHa ha. I always wondered why that lonely one-comment account existed. I suspect many people are using data abstraction and calling it OOP. I am not a professional programmer. What do you like to use when designing software? Functional? Types? C? Haskell? Pharo?
- 8y ago
- sk1pper 8y agoPractical Object-Oriented Design in Ruby by Sandi Metz Don't worry about the "in Ruby" part, it's just as good even if you know nothing of Ruby. I enjoyed it and have never written a line of Ruby in my life :)