in reply to Make everything an object?
The point behind objects is to have intelligence. I have recently written a SQL parser. The parser emits a whole mess of objects and I think BrowserUk would agree with why. The first is that the whole thing knows how to stringify itself, from any point. The second is that I can descend the parsetree simply and easily without needing to know how its represented. Most parsetrees are somewhat regular. SQL's isn't. Hence, hiding complexity.
Your point, too, is well-taken. But, it's not a point about objects - it's a point about APIs. Your same point can be made about good libraries, too. Take Perl. It's a program that responds to an API. Do you care how hashes are implemented? The hashing algorithm changed signficantly between 5.6.0 and 5.6.1 - did you notice? Did you even know?
|
---|