ILSpy icon indicating copy to clipboard operation
ILSpy copied to clipboard

Making LoadResult a union-type.

Open daiplusplus opened this issue 4 years ago • 1 comments

Using a union-type for LoadResult to proactively avoid unexpected file load and file-not-found issues. Addresses issue #2340

daiplusplus avatar Mar 18 '21 02:03 daiplusplus

@siegfriedpammer I gather the ILSpy code has changed a lot since I originally submitted this PR - my PR was originally intended as a bugfix-with-benefits rather than a well-written refactoring to enum/union-types (I'm surprised you seem to be okay with it and replied now, I thought this PR was dead after sitting unread for 5 months).

That said, I'll be happy to resubmit this provided you're okay with me making the potentially extensive changes to adopt enum/union-types throughout ILSpy.

daiplusplus avatar Aug 12 '21 11:08 daiplusplus

I think extensive changes in this direction don't make sense. C# isn't quite that language yet -- while pattern matching is getting close to make this style of programming usable, the language still lacks proper union types (and especially Rust-style value union types, which aren't even proposed yet).

dgrunwald avatar May 28 '23 12:05 dgrunwald