Coffeehouse Post

Single Post Permalink

View Thread: is managed code faster than native?
  • User profile image

    , Bass wrote


    In a strongly typed dynamic language. Again I don't see how changing a type1 to a type2 is going to cause anything other than a type mismatch exception or even a compile-time error unless type1 and type2 are both ducks.

    Because all primitive types duck-type to each other by default. An int is a double is a string is an array is an object.

    Duck typing is basically doing the work of adding interfaces to your code so you don't have to think about it. That's all. You can implement it in static languages with a *-ton of interfaces,

    Duck-typing can be done automatically by an IDE and can be built into a language. Duck-typing is not a feature of or the sole preserve of dynamic languages. Stop quoting it as such.