Interesting stuff about Duck Typing

The discussion started with Eric Lippert, the Microsoft Guru’s post about Duck Typing

http://ericlippert.com/2014/01/02/what-is-duck-typing/

And here it gets REALLY interesting:

http://haacked.com/archive/2014/01/04/duck-typing/

http://codebetter.com/glennblock/2014/01/05/on-duck-typing/

.. So today I learned some about the term “Structural Typing”, and that some languages have taken Duck Typing further!

This piece of Scala code points to something iv been looking for for a long time!

def executeRule(rule: {def execute(): Unit}) =  {
  rule.execute()
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s