News for hackers. Stuff that matters.
Re:Minimal APIs at a glance in .NET 6 by andix on Monday September 13, 2021 @08:49AM (#28510833)
This is more functional. C# is an multi paradigm language.

There is not a big difference between an FP module and an OOP static or single instance class.

Re:Minimal APIs at a glance in .NET 6 by LAC-Tech on Monday September 13, 2021 @08:51AM (#28510867)
I think the word OOP has lost all meaning and just means "crusty old code I hate".
Re:Minimal APIs at a glance in .NET 6 by andix on Monday September 13, 2021 @09:34AM (#28511259)
In the OOP way you create controller classes. In the FP way you pass lambdas/functions.

So yes, it’s not 100% functional. But probably 80%?

Re:Minimal APIs at a glance in .NET 6 by LAC-Tech on Monday September 13, 2021 @05:10PM (#28516917)
You're creating an instance of an app class, calling methods on it, and passing objects in that method (string and lambda are objects).

I just feel like the term OOP can't win here. If it's concise people will just claim it's FP.

Re:Minimal APIs at a glance in .NET 6 by andix on Tuesday September 14, 2021 @05:33AM (#28522262)
Off course there is still OOP involved. Also most FP languages support objects to some extent. Also records and their modules have some similarities to OOP. And even FP can be never completely pure, there always has to be state.

But this approach is just more functional than the one before.