Replies: 1 comment 2 replies
-
| Intriguing questions! 
 Not a leak. Deliberate exposure 😄 and helping people getting it right easily. 
 The reason we use an alias is the same as why aliases are used in F#: as a simplified, in-scope shortcut. It mimics the way  
 They are both raw types. It's just an F# alias. After compiling, the difference is gone. C# users will never see the aliases, even if you would have used them. 
 No, it is not an implementation detail. It is a deliberate choice and follows the rules of F# library design, where you create a type (or alias) and a corresponding module with the operations you support on that type. It helps with ease of discovery. People do not need to know the implementation detail that  It is highly recommended to use  The thought is simple: if you use  Using  Furthermore, it is uncommon to write library functions modules that have the name of an interface. So we'd need to use  Bottom line: this is was a very conscious and deliberate decision, following long-standing practices and guidelines for F# library design. | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/fsprojects/FSharp.Control.TaskSeq/blob/main/src/FSharp.Control.TaskSeq/TaskSeqBuilder.fsi#L37-L41
This leaks into the
FSharp.Controlpublic interface.Pros:
open FSharp.Control[as a result of using a TaskSeq.* operation] you get it for freeFSharp.Controlis a shorter name thanSystem.Collections.Generic(there's a typo in the xmdoc)Cons:
@abelbraaksma Putting this here as I'd be interested to hear your thoughts/considerations on the tradeoffs...
I intuitively used
TaskSeq<'T>in code as the xmldoc for the project as a whole uses it, but then did a double take when reviewing my library's API, converting it the raw types.My initial thought was: this needs to go; it's an implementation detail, and gets people in the wrong mindset, surely retaining it in 0.4.0 was an oversight?
My current thought is leaning toward: actually, it's terse, self-consistent with F# stuff in general, and that I'll probably switch my API back to leaning on the alias wherever possible; less chars, one less
openBeta Was this translation helpful? Give feedback.
All reactions