Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There reason you don't see interfaces or abstract classes in Ruby or Python is because they are dynamically typed. Interfaces and abstract classes are byproducts that are required for Java and C#'s type systems to work. What use would you have for them in Ruby?


I still reason in terms on interfaces when passing arguments to a function though (eg: argument X needs to behave like a string). It will later be verified in runtime and when running the tests but it's how I reason when structuring the code.


Actually Zope.interfaces for Python are more popular than I expected. Not sure how I feel about it really. They're both annoying and useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: