All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
A frequent argument for OOP is it helps with code reusability, but one can reuse code without OOP�often by simply copying and pasting.
To keep your code bug-free, encapsulation hides procedures (and sometimes even data) from other programmers and doesn't allow them to edit it. Inheritance then asks these same programmers to inherit, modify, and reuse this code that they cannot see�they see what goes in and what comes out, but they must remain ignorant of what�s going on inside. In effect, a programmer with no knowledge of the specific inner workings of your encapsulated class is asked to reuse it and modify its members.
All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
42
Originally posted by Alex Kravets:
you should read reviews on amazon for this guy's books.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Warren Dew:
In C, the library functions would have been declared (looks like a Java abstract function declaration) in ".h" header files that would have been common to all drivers and were included (equivalent to a Java import) by any client code. The driver specific code implementing these functions would have been placed in ".c" code files and compiled into binary implementations. The client's make file would have specified which implementation to link against.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
42
Originally posted by Jeroen Wenting:
It doesn't become harder in Java indeed. In fact it's at just about the same level of complexity.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
42
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
Yes, that was a sincerely twisted example. I'm not sure why procedural
print( a + b )
wouldn't be in the purest OO
( a + b ) print
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Warren Dew:
Of course, that involves even more code bloat as every single class must now have a print method.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Steven Bell:
A frequent argument for OOP is it helps with code reusability, but one can reuse code without OOP�often by simply copying and pasting.
Originally posted by Gerald Davis:
Reusability can be achieved by function.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Ilja Preuss:
Of course. You can even also achieve reusability in BASIC, Assembler and any other language.
It's just that with OO you have *additional* tools in your kit to help you achieve reusability at lower costs.
Originally posted by Gerald Davis:
Algebra can be functional but is it worth making it object oriented?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Warren Dew:
I think the often espoused philosophy of "make everything an object" does often lead to the kind of source code bloat that Mansfield complains of.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
[QB]
Not fully sure what you mean by algebra, but in Smalltalk basic arithmetic already is object oriented. That is not only very elegant, but also quite powerfull.
[QB]
Originally posted by Gerald Davis:
Personally, I have not seen Smalltalk arithmetic, but I am sure it is non standerd and there would be a learning curve for maths specialists. Mixing object oriented features with domain spacific data only complicates thing, no?
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Originally posted by Jeff Langr:
One interesting thing in Smalltalk is that there are no integer overflows. SmallIntegers become (large/unbounded) Integers on their own.
Originally posted by Warren Dew:
Ilja Preuss:
After all, in the statement
stream.print(a + b);
everything *could* be an object (in the right language).
I think that a language in which all five symbols in that statement are objects will result in significant code bloat in actual use.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Tomorrow is the first day of the new metric calendar. Comfort me tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|