Eric Elliott
Jul 21, 2017 · 1 min read

Thank you for your feedback. This article is part of a larger series. Caveats for functional mixins are covered in the previous article.

Writing about code is harder than it looks. There is always a tangent to explore, and we always have to make some trade-offs between depth and staying on-topic.

I use stamps instead of simple functional mixins, because you’re right — there are edge cases that you need to watch out for if your intent is to build up a library of mixins to reuse. I write about simple functional mixins to explain the basic concepts that make stamps possible.

I have used stamps for a few years now in production applications and they have proven themselves as a great alternative to class inheritance.

Re: .constructor

.constructor can be a useful handle to get the .of() method for functors and applicatives in functional programming, even if your .constructor is really a factory. It’s a case of paving cowpaths. See Array.of() for an example in the official spec. Explaining all that would be outside the scope of this article.

)

    Eric Elliott

    Written by

    Make some magic. #JavaScript

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade