News for hackers. Stuff that matters.
Re:Love this essay, I still can't (don't want to) find an ap... by keiretsu on Friday June 15, 2007 @04:30PM (#28432)
i hate OO programming because of inheritance. It pissed me off to have to look through layers and layers of parents to search for a method. Stick with good ol' functions for easy debugging.
Re:Love this essay, I still can't (don't want to) find an ap... by palish on Friday June 15, 2007 @04:35PM (#28435)
Except you can't have just functions, because then you end up with a semi-object system anyway. For example, you might have a function "dot" which puts a period at the end of a string, and a function "dot" which returns the dot product of two vectors. The first should be a string method, and the second should be a vector method. Without an object system, you'd call it dot-string and dot-vector, which is okay, but semi-object-oriented. Lisp has something that specializes functions based on its first argument.. That might be useful for that.
Re:Love this essay, I still can't (don't want to) find an ap... by Zak on Friday June 15, 2007 @05:54PM (#28449)
CL's generic functions are a bit more sophisticated than just specializing based on the first argument. Peter Seibel's book has a good chapter on them: http://gigamonkeys.com/book/object-reorientation-generic-functions.html
Re:Love this essay, I still can't (don't want to) find an ap... by asb on Saturday June 16, 2007 @05:11PM (#28590)
I disagree. A language without OO can allow code to be organised in an intelligent way by providing a module system. See Standard ML as (what I consider to be) a good example of this.
Re:Love this essay, I still can't (don't want to) find an ap... by keiretsu on Sunday June 17, 2007 @06:33AM (#28632)
i agree. i'm using a module system myself and it's way better than OO
Re:Love this essay, I still can't (don't want to) find an ap... by Tichy on Sunday June 17, 2007 @10:50AM (#28661)
How can it be better, it seems to me that a module system would be a subset of an OO system? So logically it can't be better, if you are not forced to use all features of the system.
Re:Love this essay, I still can't (don't want to) find an ap... by budu3 on Saturday June 16, 2007 @10:08AM (#28539)
Inheritance is helpful in some instances. I can't imagine JUint with inheritance. But it can definitely be misused.
Re:Love this essay, I still can't (don't want to) find an ap... by aston on Friday June 15, 2007 @07:36PM (#28461)
Sounds like you need a better IDE. Or grep...
Re:Love this essay, I still can't (don't want to) find an ap... by paul on Friday June 15, 2007 @04:40PM (#28438)
So don't use inheritance. Seriously. Inheritance is annoying, but unnecessary. I generally avoid it. You can still use other parts of OO.
Re:Love this essay, I still can't (don't want to) find an ap... by ralph on Saturday June 16, 2007 @06:13AM (#28530)
Good advice, but it doesn't help when one's coding in a larger system not just written by oneself. Then there's operator overloading; you can't trust anything to be doing what it suggests in an unknown, or large, codebase. Code readability goes down the pan if too much is hidden by mis-used OO techniques.
Re:Love this essay, I still can't (don't want to) find an ap... by Tichy on Sunday June 17, 2007 @05:13PM (#28731)
Not all OO languages allow operator overloading.