Gratian Plume
Gratian Plume
> 3. This is very general, but might help: DUs should be used when there is a well-known set of distinct cases, where "distinct" means that each case must be...
> > Is it possible to add an operator to the core library that apply a function for each case of the DU > > The key point is to...
> @GratianPlume Do you have an example where there's a real-world performance gain for your solution? I ask because even though the use of `InlineIfLambda` does inline the operation, it...
> Is this suggestion about > > 1. the inlining strategy of the compiler, and > 2. the only purpose of the proposed operator is for providing more control of...
> Btw, why do you want to use [DefaultAugmentationAttribute](https://github.com/MicrosoftDocs/visualfsharpdocs/blob/master/docs/conceptual/core.defaultaugmentationattribute-class-%5Bfsharp%5D.md) with `false`? It removes the code normally generated for proper operation of the DU, and I think you'd then have to...
@TIHan @abelbraaksma Thanks for your suggestions.@abelbraaksma gived me so many tips, and they are great. I have to build a complete agent library for downstream engineers. In this magical country,...
> @greatim > > Thank you for reporting this. I am having trouble reproducing your issue. I created two libraries like you said and the code generation appears to be...
@abelbraaksma > use `Option.ofObj` for anything that comes in from exposed interfaces, it's safe. But how to give a option value to C#? If use `Option.toObj`, I should use `AllowNullLiteral...
>If you need to return a value that's an option type, use Option.toObj. It'll return null for None, just as C# programmers expect. Better yet to don't return anything that...
@abelbraaksma OK, I got it now. I should take a unsafe handle in a helper module one time, but not to use `Unchecked.defaultof` every where.