Is there some literature on this type of programming?

前端 未结 8 723
[愿得一人]
[愿得一人] 2021-02-01 05:56

In college I took on a class on modern physics, in which we learned about special relativity. I was completely blown away by how different frames of reference could actually ob

8条回答
  •  长发绾君心
    2021-02-01 06:55

    It seems to me like you're implementing functional programming in an OOP way. Regardless of the Physics explanation about "special relativity" , The entire idea of OOP is basically encapsulation - You want to objects to know themselves how everything should be done. Basically what you're saying here is "no , there is only data and functions that work on the data" . What if the deck changes? you get a new Dealer? how will you know which dealer should be created to deal the new deck?

    If you thought about a "switch" statement , then you're hammering OOP concepts into a functional programming template.

提交回复
热议问题