The Artima Developer Community
Sponsored Link

.NET Buzz Forum
On the evilness of parameterless default properties...

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Paul Vick

Posts: 783
Nickname: paulv
Registered: Aug, 2003

Paul Vick is a Tech Lead on Visual Basic at Microsoft Corp.
On the evilness of parameterless default properties... Posted: Sep 2, 2005 11:04 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Paul Vick.
Original Post: On the evilness of parameterless default properties...
Feed Title: Panopticon Central
Feed URL: /error.aspx?aspxerrorpath=/rss.aspx
Feed Description: a blog on Visual Basic, .NET and other stuff
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Paul Vick
Latest Posts From Panopticon Central

Advertisement

Apropos of the previous entry, I should add that I agree wholeheartedly with Eric’s contention that parameterless default properties were almost entirely evil. They did make working with some objects much easier, but they came at such a cost of understandability that I don’t believe that, in the end, they were worth it. When I started working on the VB compiler as we were porting to .NET, I tried to get a coherent explanation of exactly how parameterless default properties worked, especially in situations like functions that returned objects that had parameterless default properties that returned objects that had parameterless default properties, etc. Although there was a document that purported to show how it was all supposed to work, I believe the document was demonstrably wrong. In fact, I think the only real “documentation” for the behavior was the code itself. (I’m not even sure the developer working on the code could explain how it really worked in practice.) I wasn’t sad to see them go.

I part ways with Eric, though, on default properties with parameters. I think they’re incredibly useful and don’t agree with the C# philosophy of only allowing a single “indexer.” Maybe the C# brainwashing has already begun… <g>

Read: On the evilness of parameterless default properties...

Topic: SharePoint Web Services Previous Topic   Next Topic Topic: My first London .NET User Group meeting

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use