Re: question on anonymous type



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
.



Relevant Pages

  • Re: How does this make you feel?
    ... > [listing system programmers, app programmers, end users] ... bug and feature since they are sometimes synonymous. ... > Bugs that are visible all the way up to the end user: ... > 1% because the big limiter is memory latency. ...
    (comp.arch)
  • Re: Rene is a hypocrite (OK, what else is new?)
    ... I dont know any avarage programmers. ... RosAsm doesnt detect it. ... But AoA is no longer very useful, unless HLA is involved. ... The right click feature is espesially nice in a monofile architecture. ...
    (alt.lang.asm)
  • Re: Whats the deal with C99?
    ... be in the language. ... languages by itself speaks volumes about what programmers want. ... There's no feature added to C99 that addresses even one thing that has ... There's no controversy about memory management? ...
    (comp.lang.c)
  • Re: Decouple SQL queries from class in OOP design
    ... > programmers (or business analysts, or software engineers, or project ... > Is this feature really qualify for an 80/20 rule of any sort? ... > programmers worrying about how to color-code text to each user's taste ... The new model of biz is to give the "customer" what they WANT. ...
    (comp.object)
  • Re: Has MS given up on us (again)?
    ... would just bite the bullet and merge the two language teams. ... Instead of C# leaping ahead with one particular new feature for one release, ... I find often C programmers hold these same feelings too. ... C was terse and powerful among languages back in the day and Basic ...
    (microsoft.public.dotnet.languages.vb)