First C# should have tuples. When I first started using Python I found tuples to be annoying, and unnecessary, but now I wish that they were available in more languages. Too often I find myself creating a struct to act as a tuple class for me. While this works the workaround should not be needed.
C# should get rid of the decimal type. The fact that there is a decimal type that is separate from a double is simply confusing. Most programmers are used to defining close to all of their numerical variables as either int or double, so to present this additional value type in a number of gui components just forces a lot of casts that shouldn't really be needed.
Strings should also autocast. In Java whenever you concatenate a non-string object to a string, the toString() method is called automatically. C# on the other hand forces you to write out all of the casts. While the underlying code ends up being the same for both situations, the Java approach to this is cleaner, and easier for the programmer.
Variables should scope in the same manner that they do in most other programing languages. In that you can re-use a variable name as a different variable within a loop or conditional. While banning this does make some things simpler, it can be quite a pain to be forced to come up with a different throw away variable after being allowed to use the same one in other languages.
using System.Web needs to be simpler. Unlike almost all other .Net components, when you use system.web instead of simply working you need to go and explicitly add it as a reference. While I understand why this type of opt in system would be wanted for COM components anything that is .net anyhow should simply just work, or at the very least be automatically added as a reference by visual studio.
There needs to be a simple way to write multiple sorting algorithms for custom made objects so that arraylists and the like can be sorted by different components by using simple method calls. The current simplest system requires you to declare delegates as an argument within the arraylist's sort method. While this works there is no reason that this couldn't be simpler.
Every event argument should not require both an object sender and EventArgs e, more often then not both of these values are simply ignored, so they should be optional. Yet these two values are passed whenever anything happens regardless of if they need to be used or not.
These seven issues are all things I would love to see fixed in C#. Still the list is mostly small, and workarounds are available for most of these gripes, but that doesn't imply that changes would not be nice.
Published by Eric Harty
- Net Operating Losses Generate Cash for Small BusinessesA net operating loss can be carried back and deducted against the taxable income of the two prior years, producing a tax refund that can be used to meet pressing liquidity needs.
- UPDATE: FCC Says "Yes" to Net Neutrality - McCain "No"; Conservatives Don't All AgreeWhether or not Net Neutrality is good or bad for free enterprise is still a question...even among conservatives.
- An Oldie but Goodie-Funtasia.net Is Still the Best Coupon Code SiteFuntasia.net has been around for years, featuring a diverse array of coupon codes on an extremely well organized site.
- The Safety Net DebacleThe "Safety Net" is the name of legislation that pays states for the federal land it houses. The legislation just expired and many Counties are in extreme distress.
- Nothing but Net!
- Southbound Cruisers Net for Sailors on the Pacific Coast of Mexico
- Selling Your Books Online with Cash4Books.Net
- Net Neutrality: Good or Bad?
- Review: NET Bible - Compact Edition - Cromwell Premium Bonded Leather
- Real Estate Specializing: Triple Net Lease Property
- Review: The NET Bible - Reader's Edition - Black Cromwell Premium Top Grain Genuin...



