Re: How to overload == for System.Double
Alan Baljeu <[email protected]> Fri, 2 Feb 2007 13:25:53 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <088401c746f7$92d07570$1dc80ac6@CTI> |
> -----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#? 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! =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com