News for hackers. Stuff that matters.
Re:Execution in the Kingdom of Nouns (2006) by abecedarius on Wednesday February 13, 2013 @02:05PM (#5214971)
OOP goes bad when you take a centralized design and nominalize the verbs, yes. It's more fun to think in terms of trained animals: "Trash, go empty yourself outside."

    TrashBag >> emptyInto: vessel
      |here| here := self place.
      self go: vessel place.
      vessel add: self spill.
      self go: here
This seems just as reasonable as the English he wrote. (I like functional programming too.)
Re:Execution in the Kingdom of Nouns (2006) by russellallen on Wednesday February 13, 2013 @05:30PM (#5216130)
Trained animals is a good metaphor. Not passive objects acted upon but actors. Your example is even cleaner in Self which allows implicit 'self':

  emptyInto: vessel = (| here |
    here: place.
    go: vessel place.
    vessel add: spill.
    go: here
  )