DEV Community

Discussion on: .NET Looks at Functional Programming Techniques.

 
jwp profile image
John Peters

What's mandating about anonymous classes, or use of Dynamic? Typescript is more modern than C# and gives the developer a choice of strong and weak typing. Most of all it treats functions as first class citizens.

I'm not raining on any parades here, that's your idea of what I'm doing. I'm just proving my point that .NET people don't really like accepting Functional Programming ideas outside of their curtained niche. Shoot the majority don't embrace Extension methods.

Thread Thread
 
thebuzzsaw profile image
Kelly Brown

What's mandating about anonymous classes, or use of Dynamic?

I was referring to their decision to mandate namespaces and classes contain the code that actually runs (namely methods and variables).

Typescript is more modern than C# and gives the developer a choice of strong and weak typing.

Weak typing sux. Don't need it.

I'm just proving my point that .NET people don't really like accepting Functional Programming ideas outside of their curtained niche. Shoot the majority don't embrace Extension methods.

I love extension methods. I don't know many people who hate 'em.

What's your whole angle with pushing functional programming into .NET projects? If the people you work with don't care for functional programming and are solving problems just fine in OOP or other paradigms, what do you care? If you wanna use functional programming in your own projects, knock yourself out. I see plenty of functional programming done in C#, though.

Thread Thread
 
jwp profile image
John Peters

Weak Typing does suck except for disciplined OOP folks who know when to use it to their advantage.

Ya I love extension methods too, they are the only real functional style (apart from the Func) in C#. No fancy interface or class defs needed there, as they automatically telegraph the interface, and there's no way to get by it.

Functional programming using extension methods is my angle. That's all.

Thread Thread
 
saint4eva profile image
saint4eva • Edited

Lambda,
Linq,
Extension Method,
Anonymous Method,
Delegates,
Switch Expression,
Local Method,
Pattern Matching,
Higher Order Function etc.
C# has both functional and OOP capabilities.

Thread Thread
 
jwp profile image
John Peters

You're right...