3 ms·
> each Smalltalk object is a recursion on the entire possibilities of the computer. So it's like a lambda expression. Except that: 1. OOP was invented 35 yea
by mnemonicsloth 13y ago
> each Smalltalk object is a recursion on the entire possibilities of the computer.
So it's like a lambda expression. Except that:
1. OOP was invented 35 years later.
2. OOP is not based on the mathematical concept of the function, which is (arguably) the most successful idea ever dreamed up by (not as arguably) some of the smartest human beings ever to live.
3. Objects are lies. An object that calls itself a COW is not a cow; a function that calls itself SEND-COWS-TO-MONTANA really does send the cows to Montana.
Ergo OOP=dumb. What am I missing?
- taeric 13y agoI'm curious why "an object that calls itself a COW is not a cow" yet "a function that calls itself SEND-COWS-TO-MONTANA really does"? Both are merely abstractions over ideas, no? One over the idea of a thing, one over the idea of doing something.
- vinceguidry 13y agoI think the idea is that domain logic is encapsulated in functions, while the objects themselves only contain metadata. So if you have an class of objects named 'COW', then the objects themselves will contain information about cows. If you simply delete the object, the cow will still exist. However, if you run a function called, "slaughter_cow", then that should actually do something, maybe it will mark that cow for slaughter. Running functions should have real-world effects, directly manipulating data objects won't. (except maybe to cause confusion)
- taeric 13y agoBut this really just falls into the "no true Scottsman" fallacy, doesn't it? I mean, running a function called "slaughter_cow" that will only "mark that cow for slaughter" it is misnamed in some sense. Same for any function. Unless what you are doing is fully abstract in the first place, than any abstraction over it will in many senses be a lie.
- vinceguidry 13y agoThe worker who got the message on the screen slaughters the cow, how can you not consider the worker and his process part of the code as well?
- coldtea 13y ago>3. Objects are lies. An object that calls itself a COW is not a cow; a function that calls itself SEND-COWS-TO-MONTANA really does send the cows to Montana. Err, no it doesn't. Both are manipulating symbols (names), not actual cows. That's how we can have games like Sim City that don't cost trillions of dollars to play.