Minimalist Classes

Axel Rauschmayer axel at rauschma.de
Wed Nov 2 08:58:58 PDT 2011


>> That said, there are some valid use-cases for it... I guess?
> Encapsulation? Stability of interfaces? Better readability? The use case is more about code quality and expressiveness rather than adding a new capability to the language. 


The two most interesting use cases I see are (for all my other privacy needs I use naming conventions, but there are people who don’t like that):
- Avoid name clashes (e.g. when mixing in a trait, but also when doing subtyping).
- Enable special functionality. You could also use a naming convention here, but using a name object is nicer.

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111102/eaf098fc/attachment.html>


More information about the es-discuss mailing list