4

encapsulation vs abstraction.... fuck ... such a small thing and i forgot .... fuck fuck fuckity fuck. X|||||||||||||||||||||||||||||||||||||||||||||

Comments
  • 1
    And those times when they are in fact the same thing >.<
  • 0
    @SortOfTested are they? I guess what interviewer wanted to hear was "encapsulation refers to combining things of similar nature into one " vs "hiding things that are not useful to the caller and showing only the relevant things"
  • 0
    @yowhatthefuck
    Sometimes. If I write a concrete abstraction that fully obfuscates something that would otherwise be directly usable and controls the way I access it, it's also an encapsulation. Abstraction of the non-concrete variety forces things to encapsulate, and so on and so forth.

    If they were just looking for boilerplate definitions, then you dodged a bullet :)

    I do pretty much everything as composition, so the lines blur.
    https://medium.com/javascript-scene...
  • 0
    Man one line abstraction way of hiding data and encapsulation is method of hiding data. Encapsulation like private, protected etc.
  • 0
    @SortOfTested I think asking written definition isn’t correct but who knows what was thought on question.
  • 0
    @dummy
    vs indicates they exist in absentia one another. A good question would be "explain the relationship between encapsulation and abstraction."
Add Comment