Pros & cons of a callback (std::function/std::bind) vs an interface (abstract class)

I strongly prefer the first way for several reasons: Representing concepts/functionality via interfaces/class hierarchies makes the code base less generic, flexible, and then more difficult to mantain or scale in the future. That kind of design imposes a set of requirements on the type (the type implementing the required functionality) which makes it difficult to …

Read more

What is a static interface in java?

I’m curious about the case when it’s not an inner interface. The static modifier is only allowed on a nested classes or interfaces. In your example Entry is nested inside the Map interface. For interfaces, the static modifier is actually optional. The distinction makes no sense for interfaces since they contain no code that could …

Read more