|
|
Choosing A Webhost: |
Re: C# 3.0: msg#00117windows.devel.dotnet.cx
Oh yeah? Why not add class posing, forward invocations and what not? And maybe name it Objective C#? Cheers, Stoyan On 9/15/05, Mont Rothstein <mont@xxxxxxxxx> wrote: > > On extension methods I have to disagree. They are a good thing. I've used > this concept extensively in Objective-C (which calls them Categories and > are > even more powerful). > > The great thing about extension methods is that you can use them on > instances that you have not instantiated. Obviously, if you instantiate > the > instance then you can simply create a subclass and add whatever methods > you > want to that subclass. However if you are handed the instance by something > else the extension methods allow you to accomplish things that might > otherwise be very cumbersome. > > One of the biggest benefits of extension methods is that they can allow > you > to write less code. > > Can they be abused? Sure, but nothing will ever stop bad programmers from > writing bad code. > > -Mont > > > > > -----Original Message----- > > From: Discussion relating to the specifics of the C# and Managed C++ > > languages [mailto:DOTNET-CX@xxxxxxxxxxxxxxxxxxx] On Behalf Of Peter > > Ritchie > > Sent: Thursday, September 15, 2005 10:34 AM > > To: DOTNET-CX@xxxxxxxxxxxxxxxxxxx > > Subject: Re: [DOTNET-CX] C# 3.0 > > > > Eric Gunnerson has some ramblings at > > http://blogs.msdn.com/ericgu/archive/2005/09/14/466510.aspx, on > implicitly > > types variables and extension methods. I don't buy the justification of > > these two additions. > > > > I don't see the need for implicitly typed variables. The note in the > > spec. that basically suggests avoiding implicitly typed variables > whenever > > possible says it all. What's wrong with "Object"? I have the same > > opinion on extensions that require "var": Anonymous Types and Implicitly > > Types Arrays > > > > Extension methods seems to be a hack to recover from lack (or removal, > > considering C++ roots) of nonmember functions or implicit conversion > > constructors. It also reaks of a means to circumvent Sealed classes. I > > started a blog some months ago on extending C# classes without touching > > the base; but never posted it. You can accomplish what extension methods > > give you very simply. > > > > The additional object initializers seem to be just syntactic sugar to > > avoid having to write constructors. > > > > I don't know what I think about Query Expressions yet. > > > > The only compelling additions, in my opinion, seem to be Collection > > Initializers and Lambda Expressions. Lambda Expressions remind me of > > Continuation Passing Style. > > > > http://www.peterRitchie.com/ > > > > On Wed, 14 Sep 2005 15:52:36 -0500, Russell Collins > > <RCollins@xxxxxxxxxxxxxxxxxxx> wrote: > > > > >I couldn't agree more. > > > > > >-----Original Message----- > > >From: Stoyan Damov [mailto:stoyan.damov@xxxxxxxxx] > > >Sent: Wednesday, September 14, 2005 9:25 AM > > >To: DOTNET-CX@xxxxxxxxxxxxxxxxxxx > > >Subject: Re: [DOTNET-CX] C# 3.0 > > > > > > On 9/14/05, Eyvind Axelsen <eyvind.axelsen@xxxxxxxxxx> wrote: > > >> > > >> Language specification, examples etc can be found here: > > >> http://msdn.microsoft.com/vcsharp/future/default.aspx > > >> > > >> Very cool! > > >> > > >> Eyvind. > > > > > > I think I'm going to puke: > > > The implictly typed local variables and arrays extension is letting > lazy > > bastards write JavaScript in C#. > > > The object initializers extension is something which I expected in C# > > 1.0. > > > The collection intializers extension is useless, and can only serve > book > > writers write contrived examples. > > > The anonymous types extension is a replacement of a worst practice, > > which is returning a quick-and-dirty tupple (tripplet, whatever). We > used > > to return object[] for doing that. > > > The lamda functions extension is for lazy bastards, which also like to > > write write-only code. > > > The query expressions extension is, well, no comment. Really, this is > > CSql, not C#. > > > I would really appreciate a slightly more powerful generics to all of > > the "extensions" above. > > > Cheers, > > >Stoyan > > > P.S. Haven't had much sleep recently > > > > > >=================================== > > >This list is hosted by DevelopMentor(r) http://www.develop.com > > > > > >View archives and manage your subscription(s) at > > http://discuss.develop.com > > > > > >=================================== > > >This list is hosted by DevelopMentorR http://www.develop.com > > > > > >View archives and manage your subscription(s) at > > http://discuss.develop.com > > > > =================================== > > This list is hosted by DevelopMentorR http://www.develop.com > > > > View archives and manage your subscription(s) at > > http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > -- Cheers, Stoyan =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: C# 3.0, Mont Rothstein |
|---|---|
| Next by Date: | Re: C# 3.0, Stoyan Damov |
| Previous by Thread: | Re: C# 3.0, Mont Rothstein |
| Next by Thread: | Re: C# 3.0, Ted Neward |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |