The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I completely agree.
Even if we can simulate multiple inheritance with interfaces and extension methods, well, extension methods are ugly, require a special using to be available and can't be virtual.
So, multiple inheritance will be great. And if there are persons that use it incorrectly, well... there are persons that do all kinds of stupid things.
Having a generic type constraint on operators.
Something<t> where T : +, -, >, <
Or something. Or just provide one easy way to work with numerics, for example:
Something<t> where T : numeric
After which you can use +, -, >, < etc. by default and T can be int16, int 32, int64, single, byte, double, decimal or an unsigned of those.
Enum that supports other types, not just integral types.
A required tag on the end of block regions. Why?
Cause it can become a bitch knowing which '}' belongs
with what after a while and folks are too lazy to comment.
Or VS could get better and put a comment there for you.
But then this isn't about VS.
Improved Friend relationships between DLL's. Current way of setting up Friend relationships is awkward.
- An analogue to the ?? operator that returns null if any object in a chain of lookups is null, e.g. var furniture = house.livingroom.sofa without having to null-check every step.
- Return type covariance.
- typedef support, mainly to alias a pervasively used ugly generic type without needing to put a using statement in every file. More useful for value types that can't be subclassed to achieve similar ends.
The ability to look at a variable's memory location while in another part of the program.
In C++, I sometimes use what I call the "Stakeout Debugging Pattern": I create a Watch expression on the address of a variable, so I can see how it changes while not in scope. (The debugger won't show variables not in scope). E.g.
But there's no way (that I know of) to do this in C#. This would help with debugging.
Doesn't .NET constantly relocate variables to other memory locations? Which would mean you could watch an address, but if it changes that doesn't mean the variable you were watching is unreachable or out of scope. So what would you get out of it?
In Java, every function must declare all potential throws. The compiler looks down the call stack and makes sure that exceptions are either handled or declared in the throws. If not, it's a compilation error. That annoys many Java developers, which is why I think the feature should be optional.
If it was optional, we could generate a warning on unhandled exceptions. IT would not be a compilation error like it is in Java. This wouldn't totally prevent any problems, but it would give developers a way to be more explicit about what exceptions can happen. For library designers this would be very helpful.