StardustPL / Stardust

"A programming language that doesn't make me angry to use it."
https://StardustPL.GitHub.IO/
The Unlicense
4 stars 0 forks source link

Planning: Adaptors #2

Open LB-- opened 9 years ago

LB-- commented 9 years ago

Adaptors allow an object to be accessed through an interface that it does not explicitly implement (or even know about). Unlike proxies, the actual object is always being dealt with. Adaptors form a bridge between an existing interface and an existing class. One can cast from the class to the interface via the adaptor of their choice.

When a class implements an interface, it is the same as implementing the default adaptor.