Re: How to overload == for System.Double

Sebastien Lorion <[email protected]> Fri, 2 Feb 2007 15:10:11 -0500
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <[email protected]>
Thanks for your comments. I also agree with what you say. I think it will
make it hard to know where a method is coming from and for working with LINQ
since a while, I already find it annoying in Intellisense to have all that
additional stuff appear in the drop down. I think they should group these
methods together and not only displaying them in alphabetical order.

The comment you mention about using that feature could also be said of
generics for example, but contrary to extension methods, generics bring
something useful that cannot be done otherwise. That said, maybe there is
another use for them besides the classical Algorithms class. It does make
code a bit more discoverable.

Anyway, getting OT now ;)

Sébastien
www.sebastienlorion.com  

> -----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."
> 
> ===================================
> 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