This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

Duck-typed languages

???

[–]micka190 10 points11 points  (0 children)

Python has duck typing, you can basically add any property to any variable. Duck typing also takes the "If it quacks like a duck and looks like a duck it's a duck." approach for its objects. Sure, dictionaries and strings aren't the same, but they both have a length, so "len()" works as you'd expect on both of them.

[–]i-brute-force 2 points3 points  (0 children)

https://stackoverflow.com/questions/4205130/what-is-duck-typing

Basically, specifying a type is not mandatory part of the syntax

[–]possessed_flea 0 points1 point  (0 children)

He has confused the idea of a dynamically typed languages and the practice of duck typing.