3 ms·
> This should have been in C++ from its inception to be honest, to avoid blah_type<with_this> something = new blah_type<with_this>() repetition. Type inference
by megaman22 9y ago
> This should have been in C++ from its inception to be honest, to avoid blah_type<with_this> something = new blah_type<with_this>() repetition.
Type inference for this is about the only way to make "enterprisey" C#/Java code palatable.
The only problem is if you're a .NET shop that is a little crusty, and people start having PTSD flashbacks and conflate the C# type inferred "var" with the old VisualBasic monstrosity Variant type.
- memsom 9y agoPersonally, I wee it more like the bad old days before "Option explicit" and "Option strict" being turned on and every variable being declared as "dim x" with no type. Sure, that then used a variant in the background, but the chaos it installed is what scares the crap out of some shops with regards to "var" and C#. If you were a good VB.Net citizen, you always newed up your variables like : "dim x as new Y()".