Aditya Purwa
1 min readOct 22, 2018

--

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?

--

--

Aditya Purwa

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