|
|
|
|
|
by layer8
718 days ago
|
|
> Adapter is an OOP-ism. If you take, for example, any ML-family language, you won't find anything of the sort. This is incorrect. For example in SML you have signatures and structures, which are roughly analogous to interfaces and implementing classes in OOP. And SML functors are adapters that can adapt a structure of one signature to a different signature. Or they may create a proxy structure for a given structure. Furthermore, you could easily imagine a derived language where functors are just regular functions and structures are regular values. |
|
> you could easily imagine a derived language where functors are just regular functions and structures are regular values
I'm pretty sure someone taught me this some time ago but I have forgotten it, can you do it that easily? Aren't you at least supposed to make a distinction about types and kinds? I really don't remember, I'm genuinely asking.