News for hackers. Stuff that matters.
Re:Are dynamic languages going to replace static languages? ... by setr on Wednesday August 04, 2021 @02:34AM (#28057908)
Rust traits have the opposite behavior. If it says it’s an iterable, it must quack like an iterable.

Something that quacks like an iterable cannot be used as an iterable, unless the trait is explicitly stated — unlike python, where it simply has to quack.

Re:Are dynamic languages going to replace static languages? ... by yxhuvud on Wednesday August 04, 2021 @03:37AM (#28058335)
Crystal would be a better example of a statically compiled language with duck typing.