How JavaScript works: 3 types of polymorphism

image

Thanks, there is some nice information here! It’s unchangingly useful to have precise vocabulary for talking well-nigh code. I’d unchangingly thought of inheritance as a form of ad-hoc polymorphism; but reading your vendible I realize that it makes sense that there is flipside category, subtype polymorphism, that captures most uses of inheritance.

Now for some constructive criticism. I think this vendible covers too many topics for one post. As a result I think you veiled the lede on what the 3 types of polymorphism are.

The discussion of inheritance patterns in javascript is lengthy, and I don’t think it adds to this article. Someone who is ready to learn well-nigh polymorphism patterns probably once knows well-nigh inheritance. I think this should be its own article, “How JavaScript works: N types of inheritance”. On the off endangerment a reader feels they don’t understand inheritance in javascript well unbearable you could include a link to an explanation.

I have the same thought well-nigh the discussion of how object-oriented programming works, and how it relates to polymorphism. I don’t think these sections add much. I think your readers will skim through these sections.

I think the “Types of Polymorphism” section and pursuit sections nicely capture the relevant information for this topic. To make an vendible that is as focused as possible I would start with the “What is Polymorphism” section, then skip directly to “Types of Polymorphism”, and cut everything in between.

Comments are closed.