3 ms·
Might be heresy to come in to an OOP-bashing thread and say this, but the noun thing fits my mental model perfectly. IMHO, verbs aren't 'done' by nothing and da
by 000ooo000 3y ago
Might be heresy to come in to an OOP-bashing thread and say this, but the noun thing fits my mental model perfectly. IMHO, verbs aren't 'done' by nothing and data rarely exists without belonging to something, so it feels fine to me. I always find these discussions interesting though because clearly a lot of people feel differently (and very strongly in some cases).
(Please don't take this comment as an endorsement of OOP as practiced in the corporate world or that traumatic memory you have of an OOP codebase.)
- afiori 3y agoHaving a class whose only purpose is to have a run method feels like writing () => 2
- 000ooo000 3y agoDo you put all of your source code files in 1 folder?
- afiori 3y agoI am confused on the relevance of this question
- 000ooo000 3y agoMy obtuse point is that though sorting your source code files into various directories offers no functional benefit*, some folk find it useful from an organisational perspective. Maybe there's an element of that in housing functions an object. *bear with me - admittedly there are languages/technologies where directory structures are required, but hopefully you get my point.
- afiori 3y agoMy point was that if a function in your language is class {public function call() {...}} then it is going to be unergonimic to write what other languages write as array.map((elem)=>{...})
- JoeNr76 3y agoYou can use verbs passively to do something on something else. Or you can have your program or process do it. Logically, I see no difference between: "The HandlerCreationFactory created a Handler based on the Request." (oop) "A Handler is created based on the Request." (passive) or "The program (or process) creates a Handler based on the Request. " Only that the first one needs a lot more nouns, even when they look silly.
- StackOverlord 3y agoInform7 Actions and Rules system made me reconsider the centrality of the notion of Object when it comes to dispatching (note: Inform7 reads like english). Inform7 takes a verb-centric stance, then consider the subject (i.e. "this", in OOP), then the object (i.e. the arguments to a method). You can inject more specific behaviors in an action (i.e. something akin to a multimethod in CLOS), by adding an adjective to a verb/method complement/arguments. You can even use adjectives on the verb/sentence. All of this is gathered within a rulebook associated with the verb that exists aside of the actual source code: you can write code linearly, following the natural order of a given user story from the domain you model, using multiple verbs in succession, but can still display all a verb's rule, encompassing many user stories. Most importantly, it is truely extensible because you can't add code to an action's rulebook without doing so through a rule, which has the same role as a junction-point in aspect oriented programming or even subject-oriented-programming. https://en.wikipedia.org/wiki/Subject-oriented_programming https://en.wikipedia.org/wiki/Subject-oriented_programming https://en.wikipedia.org/wiki/Aspect-oriented_programming https://en.wikipedia.org/wiki/Aspect-oriented_programming https://ganelson.github.io/inform-website/book/WI_12_1.html https://ganelson.github.io/inform-website/book/WI_12_1.html https://ganelson.github.io/inform-website/book/WI_19_1.html https://ganelson.github.io/inform-website/book/WI_19_1.html