Re: Key word suggestions?

"Charlie Poole" <[email protected]> Mon, 8 Sep 2008 16:56:49 -0700
Newsgroups gmane.comp.windows.dotnet.nunit.devel
Message-ID <016301c9120e$922bdcc0$6401a8c0@ferrari>
Hi Olof,

> And I must confess while re-reading the code I typed above, 
> I'm not entirely sure it is valid C# :)
> 
> Since IComparer is an interface and not a delegate type, that is..
> 
> Not at a compiler so cannot really verify nor falsify, but my 
> gut feeling is "not possible".

I agree - although an overload woud make it possible.

I'll wait for demand, since I'm not personally inclined to
the anonymous route for this purpose.
 
> So will it be UsingComparer at the end of the day anyway..? :)

For me it's between that and CompareUsing. I liked CompareWith
till I realized it could be taken as CompareWith( someValue ).

Charlie

> >
> >> The latter may well become (if not already!) the more 
> common with the 
> >> shorter syntax of .NET3.5: (or is it 3.0..? Don't you just hate it 
> >> when big versions come so close they are hard to distinguish..?):
> >>
> >> Assert.That( data, Is.EqualTo(expected).Using( (a,b) =>
> >> a.Name.CompareTo(b.Name) );
> >
> > It's short but not easy to read in my opinion. However, I guess we 
> > have to support it.
> >
> >> What I mean is that choosing the short name "Using" might 
> be a little 
> >> too brief without the added readability of the variable name 
> >> "myComparer", given the most ubiqous use case
> >> (?) of an anonymous IComparer ...
> >
> > That's what we have these lists for! Like I said, I never 
> thought of 
> > anyone doing that.
> >
> > Charlie
> >
> >> >
> >> > Charlie :-)
> >> >
> >> >
> >> >
> >> >
> >>
> >
> >
> >
> >
> > 
> ----------------------------------------------------------------------
> > --- This SF.Net email is sponsored by the Moblin Your Move 
> Developer's 
> > challenge Build the coolest Linux based applications with 
> Moblin SDK & 
> > win great prizes Grand prize is a trip for two to an Open 
> Source event 
> > anywhere in the world 
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > nunit-developer mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/nunit-developer
> >
> 




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/