Nice article GoFrendi Gunawan!

I think currying can be used when you want to attach specific operations to an existing function. It is like composition or a mixin. It works without caring too much about the function being curried.

While the purpose of inheritance is to provide a framework on building on top of existing class, so we have to follow the rule of the base class, and another class properly use our class to do the setup. In Eloquent case, it could understand how to set up the ORM mapping because we follow the convention of the base class.

Currying in OOP would be composition class, you simply create a class that wraps another class, not extending it.

Its my personal opinion though, what do you think?

Building Playtune (https://playtune.app) - Software engineer, writer, designer, and artist.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store