Click here to Skip to main content
15,891,708 members
Articles / Programming Languages / C#

Better Functional Programming Support Is Coming In C# 7

Rate me:
Please Sign up or sign in to vote.
4.79/5 (9 votes)
9 Apr 2016CPOL3 min read 19.7K   4   5
Get ready for the new exciting features in C# 7!

I have recently listened to .NET Rocks! episode #1272 Looking into C# 7 with Kathleen Dollard where she mentioned that the next version of C# will have better support for tuples, immutability, records and pattern matching. You can download the episode and fast forward to 27:04 and 30:04 respectively. If you are interested, you can review the C# 7 Work List of Features (revision circa March 24 2016). You can familiarize yourself with support for these features in C# 7 right now, but since it is pretty much still work in progress, by the time it hits CTP or even release – there is a big chance it will look different.

So, what can you do in the meantime? Fortunately, Visual Studio ships with F# and you can start learning the above mentioned Functional Programming concepts right now. Remember, F# is just another CLR language as C# is and many features like Generics and support for async/await came to C# from F#. When it comes to Functional Programming, I hope this trend will continue.

But why should you care about functional programming support in C# if you are primarily writing imperative style C# applications? I would encourage you to watch two excellent presentations by Uncle Bob.

The first one – SCNA 2012: Robert Martin – The Reasonable Expectations of Your CTO, fast forward to 28:22,

Quote:

I expect everyone of you to practice continuous aggressive learning... The job of a software developer, one of the primary jobs of a software developer, is to learn. We are in the industry that is moving at a tremendous pace of speed. There are new languages every couple of years, new processes all the time. We are moving along at a crazy rate. And any developer that gets a little bit behind - may not recover.

Languages come in waves and the job... the art, of being a career programmer - is the art of surfing those waves. You might be really good at Ruby right now - your career is not gonna be Ruby in 5 years. It’s gonna be something else. So, you gotta be looking ahead at the next wave. Maybe it’s Clojure, maybe it’s Scala, maybe it’s F# - who the hell knows! But you gotta be looking out there at those waves, ‘cause there will be a moment when you’ve got to hop onto the next wave and keep surfing.

You need to be learning fast... Expect to spend another 20 hours a week on your career. That’s what a professional does. Laborers do not, professionals - do.

-- Robert Martin

And the second one – Functional Programming: What? Why? When?, fast forward to 6:43. The latter video has a terrible sound, but the content is still great. I hope it will give answers to many of your questions. BTW, here is the link (hosted by MIT) to the book Structure and Interpretation of Computer Programs mentioned in the video.

If you still under the impression that Functional Programming and F# is for scientific research labs only and wonder what it can be used for – look no further than Jet.com. In .NET Rocks! episode #1240 Functional Microservices with Rachel Reese, (fast forward to 10:54), Rachel mentioned that at Jet.com they have a lot of microservices written in F# and it greatly simplified their development. Pretty interesting episode overall.

surfer

So, are you going to be ready to hop onto the next wave and keep surfing?

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
I am a software developer who likes to learn new technologies.

Comments and Discussions

 
GeneralNot generics Pin
Robin201211-Apr-16 8:43
Robin201211-Apr-16 8:43 
QuestionGenerics did not come from F# Pin
William E. Kempf11-Apr-16 3:49
William E. Kempf11-Apr-16 3:49 
Generics were introduced in .NET 2, after all.
William E. Kempf

AnswerRe: Generics did not come from F# Pin
Dmitry Zinchenko11-Apr-16 13:25
Dmitry Zinchenko11-Apr-16 13:25 
QuestionCouldn't agree more Pin
TheGreatAndPowerfulOz9-Apr-16 5:19
TheGreatAndPowerfulOz9-Apr-16 5:19 
AnswerRe: Couldn't agree more Pin
Dmitry Zinchenko9-Apr-16 7:58
Dmitry Zinchenko9-Apr-16 7:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.