Re: question on anonymous type



Jon Skeet [C# MVP] wrote:
Arne Vajhøj <arne@xxxxxxxxxx> wrote:
At the moment, yes. I think things will change as C# 3 becomes more
widely known.
I doubt it.

C# 3 will become widely known.

But most C# developers will have learned C# in earlier versions
and many of them will also use other languages from let us call
it "the C syntax family".

Yes, I use Java day to day professionally now - and regularly miss "var".

If people ignore the C#-specific features of C# 3 just because they're not used to them, they'll be really missing out.

If the only think they miss out is stuff like this that has no
functional impact, then they will survive.

And you will not be typing the class name twice. The
IDE should propose it the second time.
True, but it's not really about typing. It's about information
redundancy.
I can not see that redundancy as a big problem. The compiler
will catch it if inconsistent changes are made.

The problem with redundancy isn't the possibility for inconsistency - it's the lack of information density. It takes more space redundantly specifying information, so there's more to wade through when reading the code.

The possibility of inconsistency is the classic reason to avoid
redundancy.

Disk space is cheap.

And I find it hard to believe that the usage of var instead of
explicit classname should take longer time to read.

Arne
.


Loading