Gratian Plume

Results 14 comments of Gratian Plume

> Promoting the mutable value to a `ref` when it's closed over in an object expression like that is by design. Object expressions are objects that are allocated on the...

> I believe that a more sensible approach would be to allow `let` and `member val` bindings in object expressions just like in classes, with the same syntax. > >...

I get an idea: F# can use proxy types to pass IL checks, reorganize at target locations (non-inline functions), and erase intermediate proxy types during F# optimization. I did something...

The following code may help: ``` module Range = let inline (|Range|) (x: Range) = (x.Start.Value, x.End.Value) let inline range a b = Range(Index a, Index b) open Range type...

> @greatim my poorman's break is always `async{ ... }` without actual async code :p Oh no! It's hard to use, and packed with several layers of function.

> simply: > > ```fsharp > async { > while true do > if foo then return > } > ``` It doesn't compile

> Uh oh. But why? > I _thought_ I understand CE. 😅😅 hmmm, I can see why now. I fixed it for this: ``` let foo x = async {...

> What does it even mean to return multiple times from async? I don't know what it does. But last time I told my friend that "using `async` can break...

This suggestion has been closed more than once, including my own.

> Why an operator rather than a library function? > > Did you know that you can make your own operator? For example: > > ```fsharp > let () du...