Skip to content

Commit a4f6025

Browse files
committed
FSharpStyleGuide: discourage task{} blocks
1 parent 7ff7fee commit a4f6025

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

FSharpStyleGuide.md

+2
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ developer to use a type-less style of catching an exception, plus the
121121
discriminated union used for its result is quite unreadable (`Choice1Of2`
122122
and `Choice2Of2` don't give any clue about which one is the successful case
123123
and which one is the exceptional one).
124+
* We prefer `async{}` blocks better than `task{}` ones because the former is
125+
idiomatic F#.
124126
* When using the function `ignore`, use always the generic type (`ignore<'T>`).
125127
* Do not use `System.ParamArray` (for variable number of arguments) as it's
126128
easy to shoot yourself in the foot, and is not idiomatic F# (it was meant for

0 commit comments

Comments
 (0)