Skip to main content
3 events
when toggle format what by license comment
May 12 at 11:51 comment added Ewan Yeah, you can push OOP as far as you like you just flip the way you call functions. I think this question is just a continuation of the argument on the previous one
May 11 at 23:24 comment added Filip Milovanović Not a thing to do with general-purpose data structures, but for the sake of the argument, yeah a getter free design would look something like that (though you could argue this is not exactly a hash table anymore). You would not encapsulate the action (by which I presume you mean make it entirely internal to the class) - as that's a very different design. Passing in an action is just dependency injection (it could also be an object) - you'd do this sort of thing if your class needs to call something, but cannot know what that something is. But again, not how hash tables are conceptualized.
May 11 at 22:27 history answered Ccm CC BY-SA 4.0