The Law of Demeter Is Not A Dot Counting Exercise

Posted by: youve been HAACKED, on 14 Jul 2009 | View original | Bookmarked: 0 time(s)

Recently I read a discussion on an internal mailing list on whether or not it would be worthwhile to add a null dereferencing operator to C#. For example, one proposed idea would allow the following expression. object a = foo.?bar.?baz.?qux; This would assign the variable a the value null if any one of foo,bar, or baz is null instead of throwing a NullReferenceException. Its a small, but potentially helpful, mitigation for the billion dollar mistake. Sure enough, it did not take long...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Agile | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 847 | Hits: 23

Similar Posts

  • Demeter Transmogrifiers To The Rescue more
  • Update to Logging in to DotNetNuke from a Silverlight Application with RIA Authentication more
  • DotNetKicks PlugIn for Windows Live Writer more
  • 19 Eponymous Laws Of Software Development more
  • Adding a DotNetKicks image via Javascript more
  • Look Mom - No Hands more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD