Re: question on anonymous type
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Sun, 08 Jun 2008 14:51:19 -0400
Jon Skeet [C# MVP] wrote:
Arne Vajhøj <arne@xxxxxxxxxx> wrote:That doesn't mean it won't prove to be useful in C#. People often underestimate how useful a feature will be when they haven't had it. Look up Blub's Paradox.I don't think that apply very well. A rather big percentage of Java
programmers also program in C#.
In which case it would be interesting to see whether it becomes more requested in a few years' time, when those developers have been using C# 3 and become used to "var". It's too early to take results *now* and draw any conclusions.
True. It could change.
But I doubt it will happen. It is not exactly a new concept.
I don't even think C# would have gotten it if it had not been for LINQ.
No, you're missing the point - with var, you tend to concentrate on what you *do* with o rather than the exact type of o (which is part of the "how").But what I do with o.m() actually depends on what o is !
But if it's obvious when *reading* the code what's going on, the details only matter when you're looking more deeply into the code.
I don't consider the type a detail in OOP.
When I'm working on a problem, I don't actually need to read most of the code closely - I'll skim a lot of it. Implicitly typed local variables help the skimming mode, and arguably slightly harm the detailed part.
I believe many people will want to know the type even for skimming.
Arne
.
- Follow-Ups:
- Re: question on anonymous type
- From: Jon Skeet [C# MVP]
- Re: question on anonymous type
- References:
- question on anonymous type
- From: timor . super
- Re: question on anonymous type
- From: Arne Vajhøj
- Re: question on anonymous type
- From: Jon Skeet [C# MVP]
- Re: question on anonymous type
- From: Arne Vajhøj
- Re: question on anonymous type
- From: Jon Skeet [C# MVP]
- Re: question on anonymous type
- From: Arne Vajhøj
- Re: question on anonymous type
- From: Jon Skeet [C# MVP]
- Re: question on anonymous type
- From: Arne Vajhøj
- Re: question on anonymous type
- From: Jon Skeet [C# MVP]
- Re: question on anonymous type
- From: Arne Vajhøj
- Re: question on anonymous type
- From: Jon Skeet [C# MVP]
- question on anonymous type
- Prev by Date: Re: How to save state of a recursive function?
- Next by Date: Re: C# equivelent of VBA "with..end with" statement
- Previous by thread: Re: question on anonymous type
- Next by thread: Re: question on anonymous type
- Index(es):
Relevant Pages
|