IS4
                                            IS4
                                        
                                    @canton7 It might be complex but not really needlessly. Imagine this situation: ```cs object a = 1; bool match = a is int x && Predicate(x); ``` You'd expect `Predicate`...
@macsux In a sense, but it's more powerful. Imagine being able not only to cast something to `List` (`List` in the proposal), but also to get the actual thing the...
@HaloFour Maybe for the beginning, the runtime could simply provide a fast way to call a generic method when one of the type arguments is provided at runtime, like this...
@orthoxerox > I've just run into a situation where something like that would've been useful. I basically had a hierarchy of abstract types like `Foo`, `Foo : Foo` and `Foo...
@DaZombieKiller That might not be necessary. There is no real benefit to a `readonly` class or a class method, as it doesn't have to be pure anyway, and there is...
@jaredpar Yes, that is pretty much it. Not sure about others, but I have stumbled upon this when doing what was pretty much my initial example. It would also give...
@DavidArno The whole concept of `readonly` is to prevent a location from being modified. `readonly` structs and methods are here to allow operating on read-only data without having to create...
Just an example of how `readonly` on classes can be bypassed. ```cs readonly class Class { readonly StorageClass storage = new StorageClass(); public int Property { get { return storage.Property;...
Thinking about it, externally `readonly` method means "this method will not modify the variable where it is called". In this sense, all class methods are `readonly` as the `this` reference...
I think we should leave the concept of purity or the actual soundness of `readonly` to other proposals. The aim of this is simple: to be able to accept readonly...