What if C#….

  • had no properties?
  • had only private fields?
  • fields were readonly by default?
  • had no mutable static fields?
  • had no static methods or static classes?
  • prohibited passing null as method parameters?
  • integrated specs/test with code, in the same file?
  • only allowed one class per file?
  • prohibited nested classes?
  • had syntax distinguishing between class dependencies and notifications with special syntax?
  • enforced command-query separation from methods?

Some of these ideas are almost unworkable, some are fundamental to the cause and some are just “my style”.  In a future post I’ll go over each in detail and see how they can be implemented–maybe I’ll just hack a few FxCop rules together and be done with it.

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>