Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Strong Duck Typing Cut from VB 9

Strong Duck Typing Cut from VB 9

Visual Basic's implementation for duck typing, known as Dynamic Interfaces, has been cut from the Orcas release due to time constraints.
Duck typing allows the programmers to interchange objects based on what methods and properties they have rather than their type or interface. While this can lead to more reusable code, it also carries the inherit problems with late binding such as invalid cast and missing method exceptions.
Dynamic interfaces were defined like normal interfaces, with one key difference. With normal interfaces, the class developer must indicate which interfaces the class implements when the class is compiled. Dynamic interfaces would have delayed that decision. Any class that happened to have all of the correct methods and properties could be treated as having implemented the interface at runtime. In effect, developers can add additional interfaces to a preexisting class that they don't control without sub-classing.
For more information on the current plans for VB 9, see the February 2007 Overview of Visual Basic 9.0.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p