Re: How to overload == for System.Double
Peter Ritchie <[email protected]> Fri, 2 Feb 2007 12:01:56 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
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." =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com