Hacker News new | past | comments | ask | show | jobs | submit login

...which illustrates one of the oddities of Smalltalk's vision of OOP pretty well. I've made deposits into accounts, or maybe I've asked banks to make a deposit into an account on my behalf, but I've never (intuitively) instructed an account to make a deposit into itself.



level error!

   account deposit: $100
was the message from the bank teller to the account, not from you :)


Do bank tellers, conceptually, think of themselves as telling accounts to add $100 to themselves? Or do they think of themselves as adding $100 to an account?


... when the bank teller's are software-driven entities, they might :)


Yes, I suppose it's the case that if the bank tellers are written in Smalltalk, the Smalltalk way of doing things make sense.


Yeah, you're supposed to say:

    bankTeller deposit: (100 dollars) in: myAccount.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: