Chapter 14. Conclusion

It’s the end of the book, party time! Right, everyone, let’s get ready. I want the dancing girls over there, the dancing boys over there and…​

Oh, just got a note from Mr. O’Reilly. We don’t have the money for the big Broadway-style spectacular finish.

OK, what do we have. Right, there’s my recorder, that’ll do. Everyone likes the recorder, don’t they? OK, and a one and a two and a…​

Sorry, folks. I’ve just been reminded of what happened to all the milk in the house last time I played recorder. I suppose we’ll just have to make do with a few thoughts from me to go home with. Such is life…​

What Kind of Day Has It Been?

Joking aside, I hope you’ve enjoyed this book. It’s taken me a fair bit of time to write, and as you can tell, I’ve put a lot of myself into it.

I’ve tried to keep the tone light throughout for a couple of reasons. First, so many dry (but nevertheless excellent) computing books are out there that I’m sure the market can handle one that isn’t.1 Second, FP itself has so many sites, articles, and books that focus on formal definitions that even I find nearly unreadable that I wanted to show that it doesn’t have to be that way.

Over the course of this book, I’ve tried to take a shallow sloping path from out-of-the-box C# all the way to something that F# developers would find somewhat familiar. Hopefully, none of it was too painful, and I hope you had a bit of fun along the way!

C# is, and will always remain, a hybrid language. It’s unlikely to allow pure functional code ever to be written, and that’s not a complaint. It’s just the reality of the situation.

You have a few options for where to go from here, if you’re still interested in continuing your functional journey beyond the scope of this book. Let me talk you through a few of those now.

Where Do I Go from Here?

You could continue your journey in many ways from here. I’ll list them roughly in order from things that you’ll find familiar to things that will require more learning from you to appreciate.

More Functional C#

It would be bizarrely remiss of me not to again mention Enrico Buonanno’s fantastic book Functional Programming in C#, 2nd edition (Manning). It’s one of the best programming books I’ve ever read. If you’ve started into FP here with me, Buonanno’s book is the best place to continue.

He goes a little deeper into functional theory than I do and covers further ground that I’ve not gone into. Compared to my book, this one is a fine wine—worth savoring slowly and fully.

The most useful thing you can do, though, is to practice. Learning is mostly about repeating the same thing over and over again until you can do it without thinking. The best way to grow as a functional programmer is to worry less about learning theory and more about writing code.

As I’ve shown in this book, you don’t have to implement the entire paradigm. Start with whatever you’re comfortable with and go from there. Dip back into some of the available books once in a while for ideas of new techniques to try.

I advise bringing up the subject with your team at work, however. The material from the first few chapters of this book is all fairly noncontroversial, but it might raise eyebrows if you start throwing monads into your code unexpectedly. Or not. Depends on your team. Having a conversion first will at least avoid the awkward situation of someone objecting to functional-style coding after you’ve already filled a codebase with it, necessitating a long, expensive, tedious removal process.

After reading further into functional C# and practicing enough to become an expert, your next step would be to pick up a new language.

Learn F#

F# is the obvious next step for a functional C# developer. It’s a .NET language and interops easily with C#, which means you can mix the code in your solution between the two languages, if that’s what you want.

Many good sources are available for learning F#. I’d probably start with Scott Wlaschin’s superlative website F# For Fun and Profit.

Ian Russell’s ebook Essential F# costs nothing beyond whatever amount you’d like to pass his way. Ian has helped a great deal with proofreading and validating the content for this book, so I’m greatly indebted to him. Say hi to him for me, would you?

I rather like Isaac Abraham’s book Get Programming with F# (Manning), which I also found quite easygoing.

Pure Functional Languages

If you’ve learned F# and are still hungry for more, the next step is to pick up one of the purer functional languages. No interop is possible between these and the .NET Framework, so how useful these would be in your .NET day job is questionable.

If you go to the extent of learning one of these languages, such as Elm or Haskell, your goal is going to be either of the following:

  • To learn a purer form of the functional paradigm, with an idea of returning to .NET with new ideas for how to write code.

  • To start an alternative career path away from .NET. There’s a good chance this would have to be with an organization other than the one you’re currently working for, unless they’re very open-minded indeed.

  • To satisfy pure intellectual curiosity. Learning is fun. That’s why I’m still here in this industry two decades after leaving higher education.

I’ll leave it to you to decide if you want to do this. For reference, however, I’m not interested in learning another language. I couldn’t even tell you which to choose.

If it’s of any use, though, the only source consistently recommended to me over the years is Miran Lipovača’s website and book Learn You a Haskell for Great Good! (No Starch Press). That’s probably as good as anywhere to start your new journey.

What About You?

Me? Well, it’s time for this much ’nighted showman to wend his weary way onward—Punch and Judy show, puppets and tricks all packed up and carried on my back. If you want to keep in touch, you can find me on my website or at various software development meetups and conferences (mostly around Europe, but not exclusively). If you should run into me, leave me not yet cold and dark. Feel free to say hi. I might even share a round or two of beer!

Looking at the clock, there’s still time for one last trick.

See here, nothing up this sleeve. Feel free to take a peek. Not that close, though! Cheeky. Nothing up this sleeve, either. Yet I shall vanish before your very eyes.

Are you watching carefully? Here I go…​

Now you see me.

1 This and Mr. Bunny’s Big Cup o’ Java by Carlton Egremont III (Addison-Wesley Professional), which I’m reliably informed really is the silliest computer book ever written. I almost wish I were a Java developer myself so I could read it!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset