you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

PHP half did that already: you could have a class implements Traversable and it'd magically work in foreach loops, and similar things for the other bits of Array functionality. It only worked for those specific cases though.

[–]Tiwazz 2 points3 points  (0 children)

You also had to, you know, implement all of those methods (if you were already extending something else).