Results 143 comments of IS4

@theunrepentantgeek That is a potential danger, but it is far from absolute. C++ has avoided it, for example, although only by having `const` as a part of a type reference.

> The array thingy [] in C# always goes after the type name, not the variable name like in C/C++ so it looks kinda wrong to have it the other...

No, there is a difference between my idea and `Span`. `Span` is a reference to an arbitrary location in the memory, but `fixed T[size]` is a by-value array. Moving a...

No, because there is nothing unsafe in the layout of the actual compiler-generated struct. Each element is represented by a separate field with the correct type, and since the whole...

@HaloFour Perhaps yes, but there are also other features in the language that use reflection. `dynamic`, as I mentioned, expression trees, and the `new()` generic parameter constraint uses `Activator.CreateInstance` under...

@bigredd0087 As I said, there could be an operation that works well if the list is sorted, but might not require it. However, I might not be good at examples...

@bigredd0087 You would have to add `where T : IComparable` to every method that would happen to call `TrySort` even if you need it in only one specific place. The...

@canton7 > If `Algorithms.LightSpeedSort` throws, calling code will get a `TargetInvocationException` instead the underlying exception, which is unexpected. Not at all. With the transformation I described, the actual method will...

@xZise That is a good use-case, and I think the syntax could be: ```cs if(value2 != null) { if(value1 is IComparable obj when value2 is T arg) { result =...

@canton7 Because the pattern would be solely `value1 is IComparable` and thus satisfied by *any* type `T`. If the type implements `IComparable` and `IComparable`, it could select `string` even if...