Re: I freaking HATE var!!
- From: "Jon Davis" <jon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 13 Apr 2007 23:22:35 -0700
"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:%23RD%23iYifHHA.5052@xxxxxxxxxxxxxxxxxxxxxxx
Not to marginalize your post, but your last statement pretty much axes all the effort you put into it:
If only it wasn't too late. The tsunami is coming. But our engineering team will NOT take the plunge into C# 3.0.
If you don't like it, don't use it, end of story.
While I won't, the basis of my frustration was the other coders--not myself. I know how to write good code. It's having to support the output of coders who code as if they just learned VBScript that is bothering me.
Outside of how you use it, and the engineering team that you work with uses it, what do you care if someone else uses it?
Because "it" very quickly dwindles into a proprietary standard.
It's not going to break any of the code you have now, so that's a non-issue.
Thank God. But I still hate var.
Your coding standards are going to dictate what you can use and how you name your variables, and your ecosystem will be preserved.
Yes, *my* coding standards. *Our* coding standards. But by our being forced to stick with v2.0 in order to avoid var,
a) our team would be forced to withhold ourselves from taking advantage of other 3.0 features than what var uses,
b) I personally, and the other engineers on our team, would be presented with an unpredicted and undesirable dillemma of whether to offer engineering services, whether to the public or to an employer, as a C# 2.0 purist or as a C# 3.0 cutting edge Microsoftie who drinks all the kool aid that gushes out of the fountains of Redmond and participates in the very bandwagon that will ultimately make a mess of the output of C# coders everywhere, and
c) put in context, the point was, add us to the list of people who don't subscribe to the appreciation of 'var'. "Don't like it, don't use it," phooey, what are you doing here? I'm here to discuss this sort of stuff--even if in a monologuish soapbox stance. :p
However, in order to get projections to work, there is no way around var.
Yes. There is. Auto-generate the inferred type information directly in the code rather than at compile time. Actually, you and others talk as if projections were a necessity in themselves. What I'm getting at is, if 'var' is the necessity of a new feature, my hatred of 'var' is greater than that feature. I loved the LINQ idea, but that was when I heard about C-Omega as C#-based language, not as C# v3, supposed successor to the language I work with everyday.
Granted, having VS.NET wire up the code for you in known types will be nice (and it should do something like this, converting projections/anonymous types to known-types), but the amount of code you would have to write by hand if you didn't have VS is enormous, and they can't depend on the IDE to pick up where language features fail.
That doesn't make sense to me. I see var as the failure. But at least we agree that VS should try to auto-populate "var" with known types.
I agree that those that use var when they know the type of what is being used (and yes, even in the case of those long generic types, use the using directive to alias it instead) should be skewered, but really, it's not that bad.
Not that bad? I spend half my coding time already pulling my hair out looking at other people's lazily written or generated code--XML node or Control lookups that should have been referenced by name or ID are instead referenced by index, referenced ASP.NET control names plopped in with namespace of "uc1" rather than origin, variable names as numbered type names rather than purpose, little "thorn in the side" things that make my job one minor bit less enjoyable. And now 'var'? Ugh.
It's also Friday, I'd save this kind of rhetoric-filled post for Monday. That's what Monday's are for.
LOL .. well we differ here :) I use the weekends to zoom out and ask myself questions like what the heck am I doing it all for.
....
.
- Follow-Ups:
- Re: I freaking HATE var!!
- From: Nicholas Paldino [.NET/C# MVP]
- Re: I freaking HATE var!!
- From: Alun Harford
- Re: I freaking HATE var!!
- References:
- I freaking HATE var!!
- From: Jon Davis
- Re: I freaking HATE var!!
- From: Nicholas Paldino [.NET/C# MVP]
- I freaking HATE var!!
- Prev by Date: Rich Client Platform (RCP) in C Sharp?
- Next by Date: Re: Rich Client Platform (RCP) in C Sharp?
- Previous by thread: Re: I freaking HATE var!!
- Next by thread: Re: I freaking HATE var!!
- Index(es):
Relevant Pages
|