|
|
|
|
|
by daxfohl
3421 days ago
|
|
In four years full-time F# use, I still find standard LOB apps work better with an OO SOA structure at the high level. I've tried various methods of designing FP-style architectures for those apps but nothing has ever ended up nice and clean as a standard interface-based SOA (in F#) and a standard OO DI utility. At the low-level, F# is awesome for immutable records, ADTs, combinators, etc., in a way that C# would be hard to replicate just because the syntax would be so foreign. So I think there's an opportunity for the F# market to explode as C# devs start to realize the utility of such things at the bottom level (and also for making interesting combinator-based libraries like suave). But in order to get there, I think the stepping stone has to be a change of emphasis in the F# world, to show off F# as a "better C#", starting with standard SOA-style OO-style frameworks, emphasizing a similar style (tupled explicitly-typed fn params, ext methods rather than pipe, C# naming conventions), and then just bumping the lower-level implementations of things and the domain model to ML style. Going head-first functional-first I think leaves F# useful to just a handful of developers, where everyone else just wants their objects and DI frameworks back. |
|
That you feel the need for DI frameworks is a great shame and more F#'s failing than functional programming per se. If F# had inherited the module system from OCaml, then there would be much less need to use objects. In OCaml, DI comes for free with module functors, no framework necessary. As it stands, I agree that you are somewhat forced to use objects as a module system, as F# has no other. That is what MS should fix.