5 ms·
This was in the context of async, where bind meant awaiting (or not, can't recall). The outcome was unpredictable async behaviour. To make things worse, back t
by fredrikholm 4y ago
This was in the context of async, where bind meant awaiting (or not, can't recall). The outcome was unpredictable async behaviour.
To make things worse, back then the async story wasn't all that great to begin with. That was on top of the already confusing "will this run in parallel"-bingo situation of .NET. This was before the .CORE-1/2/3/NET-without-the-dot period, no idea if it's any better now.
Hiding complexity in a very expressive language (F# is beautiful), running on top of a complex VM that is constantly changing... in the context of working with tight deadlines and other peoples code, I don't mind if statements.
Happy to hear that the compiler catches other (most?) cases. Perhaps I should give F# another round, it's mostly .NET that I can't find myself to relearn for the nth time.
- Arnavion 4y ago>where bind meant awaiting (or not, can't recall) Yes, but that's my point. If you have an `Async<int>` and you forget to use `!`, you'll get a type error if you try to use it as an `int`. Even with an `Async<unit>` where you think you're executing some side effect but forget to use the `!` to execute that side affect, the `Async<unit>` value will be unused and you'll get an error about that.
- fredrikholm 4y agoYou're probably right; I don't remember the details. What I do remember was parallelism being dodgy, several team members looking at it until one added an exclamation mark and solved the problem. This was F#3 in a legacy project, some five years ago. I bet lot of things have changed since.