fsprojects / fsharp-cheatsheet

This cheatsheet aims to succinctly cover the most important aspects of F# 6.0.
http://fsprojects.github.io/fsharp-cheatsheet/
Other
324 stars 60 forks source link

Shadowing Section #31

Open SpiralOSS opened 8 months ago

SpiralOSS commented 8 months ago

Maybe shadowing deserves an individual section? you used open type above for another reason, but for me a key thing that trips people up is how DU cases shadow others and/or type names. I always used to open a DU's module, but really open type on the DU brings less stuff in.

Not sure the "AuotOpen would sidestep thi"s is going to be grokked by someon scanning a cheatsheet...

_Originally posted by @bartelink in https://github.com/fsprojects/fsharp-cheatsheet/pull/30#discussion_r1390366431_