DEV Community

Cover image for Zen and Functional C#

Zen and Functional C#

Henrick Tissink on August 29, 2019

Writing functional programming can induce a Zen like experience. With clean, short blocks of code that reveal their intent and inner workings plain...
Collapse
 
ferdeen profile image
Ferdeen Mughal

Hi Henrick, really good article, I'm going to start putting this into practice!

Also noticed the sample code 'public void PriceOfFood...' should return double.

Cheers

Collapse
 
htissink profile image
Henrick Tissink

Hi Ferdeen, I really appreciate the positive feedback, thank you so much!

And well spotted - fixed it :]

Collapse
 
ferdeen profile image
Ferdeen Mughal

No problem!

Was checking where I commented on the typo and could see a couple more void returns that should also return double. They are towards the top of the post.

Cheers!

Thread Thread
 
htissink profile image
Henrick Tissink

Oh jeez - I checked the writing for typos but not the code - thanks again :]

Thread Thread
 
ferdeen profile image
Ferdeen Mughal

No worries. It doesn't take anything away from such a good post, and I'll look forward to reading more of your work. Cheers.

Collapse
 
tyronasaurus_dev profile image
Tyron Barlow-Kearsley • Edited

For a janitor, you really know a lot. You're like the Will Hunting of programming

willhunting

Collapse
 
htissink profile image
Henrick Tissink

Hahaha, thanks :) alt text

Collapse
 
jimmydeemo profile image
JimmyDeemo

Love this. I get jaded about the language I code in professionally; sees C# is steeped in methodolody that is counterintuitive to what is being achieved.

Collapse
 
htissink profile image
Henrick Tissink

Thanks Jimmy - yes exactly. The .Net team have added so much functionality to C# that you don't always know how to use it sometimes. Sticking to a clean functional approach helps; and it's a lot of fun switching your thinking from procedural to functional.