Neutrino
Neutrino
Sep 2, 2018 · 1 min read

I’m not convinced by this article.

If your application design is object oriented, then code elsewhere in the application might depend on the runtime type of classes Test and Test2, i.e. it may check the prototype.

If your application predominantly uses interfaces and nothing in your application cares what any object’s prototype really is, then your application’s run time structure is untyped and therefore your design is not really object oriented in any meaningful way.

There is clearly a judgement to be made when deciding whether to use a class class or an interface, but I don’t think it’s quite as simple as “an interface creates less JavaScript so always use interfaces whenever you can”.

    Neutrino

    Written by

    Neutrino