Re: How to overload == for System.Double

Vince P <[email protected]> Sat, 3 Feb 2007 14:22:56 -0600
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <002501c747d1$176042f0$4620c8d0$@net>
> -----Original Message-----
> From: Discussion relating to the specifics of the C# and Managed C++
> languages [mailto:[email protected]] On Behalf Of Alan
> Baljeu
> Sent: Friday, February 02, 2007 12:26
> To: [email protected]
> Subject: Re: [DOTNET-CX] How to overload == for System.Double
>
> > -----Original Message-----
> > From: Discussion relating to the specifics of the C# and
> > Managed C++ languages [mailto:[email protected]]
> > On Behalf Of Peter Ritchie
> > Sent: Friday, February 02, 2007 12:02 PM
> > To: [email protected]
> > Subject: Re: [DOTNET-CX] How to overload == for System.Double
> >
> > C# has deep roots in C++ (C# is a form of C++++).  There was
> > a conscious effort in the design of C# in the beginning to
> > break free of the non-OO legacy attributes of C++ (as it has
> > deep roots in C).  A very powerful feature of C++ is
> > nonmember functions that facilitate much of the abilities
> > that extension functions give you.  There was an explicit
> > decision to not include a feature like nonmember functions in
> > C# because it didn't fit within the vision of the C# language
> > (at the time) and wasn't considered safe, truly object oriented, etc.
> >
> > Now, in the huge push to implement LINQ in C# 3 it was deemed
> > that C# wasn't flexible enough to implement what was needed.
> > They're--what I consider--deviating from that initial vision
> > of simplicity and breaking their initial rules.  That's
> > further reinforced in the C# spec with telling comments like
> > "...extension methods be used sparingly and only in
> > situations where instance methods are not feasible or possible."
> >
> I just read the Linq overview.  I like some of what I see, but this
> just baffles me:
>
>     IEnumerable<string> expr = from s in names
>                                where s.Length == 5
>                                orderby s
>                                select s.ToUpper();
>
> Since when did this remotely resemble C#?

Since they stated that it was being added to the language.  Do you have any
suggestions?

> I get the impression that
> the syntax is all
> proprietary MS extensions, and only useful for SQL or whatever MS
> decides they want to
> enhance.  Bleah!

Um, it's for set operations, so of course it would resemble SQL.


>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com