Michael Flanakin's Web Log

Comments and complaints on software and technology in general

  Home  |   Contact  |   Syndication    |   Login
  159 Posts | 18 Stories | 268 Comments | 497 Trackbacks

News

This weblog is no longer being maintained. For the latest, check out www.michaelflanakin.com!

Twitter












Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

Miscellaneous

Here's a list of features that I'd like to see in C#. I'm grouping them by version to show if/when they are ever handled.

2.0

  1. With Statement
     
  2. Fall-Through cases in switch Statement
     
  3. Optional Parameters
     
  4. Protected Interface Members
     

1.1

  1. With Statement
     
  2. Fall-Through cases in switch Statement
     
  3. Optional Parameters
     
  4. Protected Interface Members
     

1.0

  1. With Statement
    VB has a With statement that I find very useful. There are claims that a with block would be add to the complexity, but I don't agree. I do think it could be abused, but so could anything else. This is where our skills as developers need to overcome the fact that the language could be easier to use. Think about it this way, the alternative is to use short, nondescriptive variable names, which would be even worse.
     
  2. Fall-Through cases in switch Statement
    One of the major benefits of the switch statement in C++ was that you could perform some actions on one or two cases and "fall-through" another case to perform more actions. This is kind of hard to describe if you don't know what I mean, so here...
    switch (someNumber)
    {
      case -1:
        IsNegative = true;
        break;
      case 1:
        IsPositive = true;
      case 0:
        IsNonNegative = true;
        break;
    }
  3. Optional Parameters
    I have to say that I really do like VB's optional parameters. We can do this in C#, but it requires a lot more code. I think that compiling optional paramters into the overloaded counterparts would be very beneficial to developers, and wouls save a lot of time.
     
  4. Protected Interface Members
    An interface is intended to tell other objects how to interact with the object. I have been in several situations where it'd be nice to specify a protected member that must be implemented because I want things to work a specific way. This would be helpful to instill certain practices. For instance, if I want to force an interface to have an Init event, I may also want to force a OnInit() method to raise that event.
     

See Also

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Saturday, July 31, 2004 12:19 PM