5 ms·
I've felt that way at one point, but it is on you as to how far you want to push it. If you want to do C# like it's 2008, it won't stop you. As for me, I take
by superchroma 4y ago
I've felt that way at one point, but it is on you as to how far you want to push it. If you want to do C# like it's 2008, it won't stop you.
As for me, I take the good bits that I like and ignore the rest now. I resent only two changes. Firstly, eliminating null values for classes was a mistake, and you're trading one class of error (null data) for another (placeholder/default data). There's no plus as far as I can tell. Apps with the second error scenario are in an unknown state and that's not something you want lasting for too long. The second change I dislike is that the inverse indexing syntax starts from 1 instead of 0 to access the last item. That's idiotic.
- jayhoon 4y agoC# 11 addresses the first issue by adding the required fields/properties: such members must have their values set upon instantiation. For the second one, the ^1 index stands for length-1, which is the last element's index. With ^0 the compiler should implicitly add 1 every time an index is accessed.