Re:.NET Core 3.0 Concludes the .NET Framework API Porting Pr...
by Scarbutt on Tuesday October 15, 2019 @04:11PM
(#21263157)
F# is a nightmare you want to use asp.net core.
[ Parent
| on HN ]
Re:.NET Core 3.0 Concludes the .NET Framework API Porting Pr...
by akra on Wednesday October 16, 2019 @05:21PM
(#21275888)
In a previous role some time back used F# on top of ASP.NET Core. It isn't that bad and people thought the code was quite clean in the end; we had dev's thinking going back to C# even with F# using vanilla ASP.NET would be a downgrade. There's ways to mitigate the pain of the C# specific API. We went the vanilla ASP.NET Core route (for Swashbuckle) and found only the Startup class (which could be replaced by functions in hindsight) and the Controllers (which were still clean code wise) needed to be classes. The rest (majority) of the program was typical F# code with an interfaced object usually created via an F# object expression put into ASP.NET's dependency injection. Helped to separate the web controllers from the logic layer anyway and keep the ASP.NET code to a minimal. Most of the program was written in F# style with ASP.NET used just as a web server for functions basically.
There's just few public examples on how to do this cleanly so people kinda have to work it out themselves which I think could be improved.
Re:.NET Core 3.0 Concludes the .NET Framework API Porting Pr...
by TomasJansson on Wednesday October 16, 2019 @03:48AM
(#21268033)
What do you base that on? I have had no problem with F# and asp.net core. Just look at safe stack, it uses saturn or giraffe which in turn runs on asp.net. https://safe-stack.github.io/