Both partial types and anonymous methods allow us to deal with situations
where C# does not work very well, and therefore the benefit that they bring
is higher than the benefit that case ranges would bring.
Partial types will let us segregate Windows Forms code into
designer-generated code and user code. That will make the model much easier.
There are other scenarios, but that's the primary one.
Anonymous methods are very useful in a case where you need a small bit of
code to pass as a delegate. If you put it in a separate method, you end up
with a disconnect between the small bit of code and where it's actually
used, which makes it harder to understand what's going on. If used for
scenarios such as this, anonymous methods will make your code more readable.
There is the chance for abuse with both features.
--
Eric Gunnerson
Visit the C# product team at
http://www.csharp.net Eric's blog is at
http://blogs.gotdotnet.com/ericgu/ This posting is provided "AS IS" with no warranties, and confers no rights.
[quoted text, click to view] "Duncan McNutt [FTSE]." <futmaster@127.0.0.707> wrote in message
news:OdbkV5cZDHA.1740@TK2MSFTNGP10.phx.gbl...
> So a little thing like that that may aid code readability is not good but
> adding crap like Lambada functions (anonymous methods) and partial types (
> to aid splitting source files) that is good?
>
> You have the BCLs make an entire pigs mess of VSplits and HSplits and you
> say thats good?
>
> Yet adding a simple thing like ranges into a case in the switch construct
is
> bad because you cant be assed to handle the complexity?
>
> Pass the bong.
>
>
> --
>
> Duncan McNutt
> Microsoft Product Deactivation Team
> --
>
>
> "Eric Gunnerson [MS]" <ericgu@online.microsoft.com> wrote in message
> news:ePk$macZDHA.2336@TK2MSFTNGP09.phx.gbl...
> > It's a feature vs. complexity thing.. While we agree that there are
cases
> > where case ranges are useful, we don't think that their usefullness
above
> > what you get with a simple series of if statements outweighs the
increase
> in
> > complexity.
> >
> > --
> > Eric Gunnerson
> >
> > Visit the C# product team at
http://www.csharp.net > > Eric's blog is at
http://blogs.gotdotnet.com/ericgu/ > >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > "Duncan McNutt [BSDM]" <nutmaster@127.0.0.66> wrote in message
> > news:eNPUQtPZDHA.2352@TK2MSFTNGP12.phx.gbl...
> > > Is it possible to have ranges or patterns in a case ?
> > >
> > > If not, why wasnt this designed in to make it easier instead of
listing
> > > every case value needed?
> > >
> > > --
> > >
> > > Duncan McNutt
> > > Microsoft Product Deactivation Team
> > > --
> > >
> > >
> > >
> > >
> >
> >
>
>