7

In modern C#, everything's an interface.

Zig is actually sort of similar. I guess I owe it to C# for teaching me the magic.

Sorry, I mean:

IZig is IActually ISort of ISimilar. (IContinued...)

Comments
  • 2
    That is probably the last thing that survived the OOP era... (Yes yes, today it is still OOP) But new developpers don't know about all the different patterns anymore (factory, decorator, prototype, singleton...) We are going back to functional programming and using OOP here and there.
  • 1
    Everything is bad when it’s overused.

    That’s why I hate fads like "protocol oriented programming" (protocol == interface).

    Use interfaces when appropriate. Don‘t make an interface for everything just for the sake of it.

    Same goes for pure OOP or pure FP. Use both.
  • 1
    @Lensflare I know, it’s crazy. Some people will define an interfqce for dependency injection for no good reason at ALL. Like, they won’t write unit tests for it, nothing at all. Just inject a concrete type and be done! Jeez.
  • 1
    @AlgoRythm yup, I worked with devs like that for a couple of years and tried to convince them how stupid this practice is. They wouldn’t listen.
Add Comment