32
Awlex
1y

Professor: Envision a person as an object, what methods would it have?
Student: Run
Prof: Yes, good example.
Other student: Jump
Prof: yes, people also do that
Me: Die
Prof: Well yes, but I'd prefer we don't take this any further

Comments
  • 4
    Fight(person...)
    Procreate(person)
  • 6
    Masturbate()
  • 1
  • 4
    TeleportHome()
  • 0
    How Super Mario was born.
  • 6
    setGuilt(0)

    Error: guilt level too low
  • 2
    A person wouldn't have any method. Persons are autonomous objects. They use their sensors as only input data and react to that autonomously. There are no direct ways to control their behaviour. - hence no methods. You can only indirectly make their sensors give them information that might or might not make them decide to do what you want them to do.
  • 0
    @Oktokolo For ease of use, we still consider people as a facade with certain general methods. You tell something to a person, not an ear.
  • 0
    Intercourse
  • 1
    cutOffOwnFingers()
  • 1
  • 0
    @lorentz Actually, you don't even tell anything an ear - you just broadcast the message into the air and hope that it will be sensed by the intended receiver 😛
  • 2
    But objects need to be killed at some point. Think of the memory!
  • 1
    @Oktokolo That is the transport layer. The act of telling someone something involves picking a medium based on known schedules, urgency, significance, sensitivity. If the medium is sound, it likely depends on a channel. In most western cultures, the handshake for this channel begins with broadcasting the recipient's contextual name.
  • 0
    @lorentz Still no methods - just messages that get passed into a repository and then (maybe) "pulled" from that.
  • 1
    @Oktokolo The abstraction of delivering a message to a recipient exists. It is fallible, there are false negatives and, to the extent that you can tolerate them, false positives, but it's still a unit action and therefore a method, at least in my model. Often of course I prefer a more refined approach, but the fact that I can have very similar conversations over both instant message, high latency VoIP and a beer, is testament that the abstraction works.
  • 0
    That's dark
  • 0
    A few implementation ideas:
    AddHope(IList of Lie Objects)
    GetFirstJob() {this.hope —} (that’s
    minus minus)
    AttendMeeting() {this.hope = 0;}
  • 1
    @Hazarth Masturbate(person) ...? Aaaa? Aaaaaa?? 😂👉👉
  • 0
    @cprn By definition, that function should only operate on its context.
  • 1
    @cprn It's an optional :3
  • 0
    @Hazarth Dang it. I'm used to C++ so... function overloading. But I get that in pseudo it should be clearer... `(person=self)` maybe?
  • 0
    @lorentz Honestly... I not only disagree, I think there's a space for at least one more overload: `Masturbate(with=person)`. And what's even more shocking, `person` can be a list of `Person` objects as well. Sky's the limit 😎👉👉
  • 0
    Prof: Wait, that's illegal
  • 0
    @cprn This whole thread is just API design circlejerk
  • 0
    @lorentz well, yes, but... you know.

    setGuilt(value) { this.guilt = 100; }
  • 2
    @cprn warning: unused variable 'value' [-Wunused-variable]
Add Comment