February 28, 2012 Re: foreach by value iteration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Peter Alexander | Peter Alexander:
> C# isn't the same. If you iterate over structs you cannot modify the iteration variable. You have to explicitly copy.
C# developers are old wise foxes, again :o) My respect for them grows some more every year.
Bye,
bearophile
|
February 28, 2012 Re: foreach by value iteration | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Tuesday, 28 February 2012 at 01:56:48 UTC, bearophile wrote:
> Peter Alexander:
>
>> C# isn't the same. If you iterate over structs you cannot modify the iteration variable. You have to explicitly copy.
>
> C# developers are old wise foxes, again :o) My respect for them grows some more every year.
>
> Bye,
> bearophile
I agree. They really know how to create a practical language that isn't held back by dogmatic adherence to some underlying principle. When coding in C#, it's amazing how everything Just Works, and does what is expected. There are very few gotchas in the languages, at least any that you'll encounter in day-to-day usage.
|
Copyright © 1999-2021 by the D Language Foundation