Re: Funny loop with post-increment.
Jon Skeet <[email protected]> Tue, 19 Feb 2008 08:39:17 +0000
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <[email protected]> |
Ryan Heath wrote: > For one reason I had always thought C# had abandoned this peculiar C++ > feature... Which feature exactly? > Anyone know why C# has this feature, its obvious that still people are > confused of it. > Wasn't C# about getting things *simpler and easier* than its cousins C/C++ ? And it is - I believe the result is undefined in C++. C# clearly defines what the result should be. Now code like this should be avoided, certainly - but try prohibiting it within the language spec! (The spec would be very, very tricky to get right - and it might not even be possible.) Jon =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com