Interface in a dynamic language?
Posted
by Bryan
on Stack Overflow
See other posts from Stack Overflow
or by Bryan
Published on 2010-04-21T22:09:00Z
Indexed on
2010/04/21
22:13 UTC
Read the original article
Hit count: 319
Interface (or an abstract class with all the methods abstract) is a powerful weapon in a static language. It allows different derived types to be used in a uniformed way.
However, in a dynamic language, all objects can be used in a uniformed way as long as they define certain methods. Does interface exist in dynamic languages? It seems unnecessary to me.
© Stack Overflow or respective owner