Created
April 29, 2014 01:33
-
-
Save ashmind/11388735 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Syntax of `switch`. | |
2. Syntax of `for`. | |
3. Array initializers thorugh `{}` (so now it is both `new[] {}` and `{}`) | |
4. Having both `delegate(..) {..}` and `(..) => ..`. | |
5. Reserving `*` for rarely-used pointer syntax. |
1.ancient clunky syntax -- see mandatory break
for an example.
It should be something much more compact and extensible, maybe not full pattern matching, but still.
2.for
-- also ancient and clunky.
Alternative would be merging for
and foreach
and providing a range syntax, as most for
usages just go over an int
range
3,4.Of course they can't remove things and that all very understandable, however the fact is that there are two different syntaxes for the same thing. I wish it started with the right one instead.
5.I would prefer not having unsafe at all, but it could have had some less useful syntax, e.g. int^
(as in C++/CLI).
Then we could have a shortcut for IEnumerable<>
, for example.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1,2. What is wrong with switch and for?
3. What's wrong with this again?
4. Two syntax for delegates there just because of backwards compatibility, so you can upgrade a framework by just selection a new framework version in VS.
5. What do you propose? Using IntPtr?