I've created a library to be able to write code in the style of Suave
wallymathieu opened this issue · 6 comments
https://github.com/wallymathieu/FSharpPlus.AspNetCore#getting-started
Since it uses the IAppliactionBuilder there doesn't need to be that much implementation code.
What are your thoughts?
Cool, but isn't this basically what Giraffe does ?
Giraffe focuses more on performance so uses Task<_>
and CPS instead of Async<_>
. I feel that using Async<_>
is more composable (slightly nicer to work with). It could also be that I need to figure out the monad transformers for Giraffe.
From a personal perspective I would start out with something Suavish and then go Giraffe if I need to optimize performance further.
I see. I agree that Async<_>
is easier to work with.
My scanf ( https://github.com/cannorin/FSharp.CommandLine/blob/master/src/FSharp.Scanf/scanf.fs ) works 10x faster than that of Suave but
- it introduces additional dependency (FParsec)
- the optimisation only works with up to 7-tuples, and for 8-tuples and more you have to fall back to reflections which is about 7x slower compared to the optimised ones