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

Encapsulation works even better with modules than with objects:

(0) Modules may expose n-ary operations on abstract types for n > 1.

(1) Modules may have multiple interrelated abstract type components, i.e., what Stepanov calls “multisorted algebras”.

Furthermore, if you are willing to use an impure language (like ML or Scala), modules can be just as stateful as objects if you deem it necessary.



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

Search: