Join Kit Eason for an in-depth discussion in this video Result type functions and railway oriented programming, part of What's New in Visual Studio 2017 for F# For Developers.
- [Instructor] Let's tie up some of the loose ends…we left from the previous video,…when we were talking about the result type,…and a little bit about railway oriented programming.…I'm just going to reiterate in a kind of more visual way,…in case that's the way you learn stuff.…Remember, what we're trying to do is get from a situation…where we have some process that returns some result,…and some other process that consumes that result,…and some consumer of the overall product,…where each of the processes might fail.…And traditionally, we have a kind of layout like this,…where there's a happy path that goes from Process 1…to Process 2 to consumption, and the unhappy path…is kind of completely separate.…
The arrows shoot out of the various processes…in the form of exceptions,…and you need some kind of exception handler…which deals with all the possible results.…And what we're moving towards is something…that looks a little bit more like this.…Again, we've got Process 1, which has a happy path output,…and Process 2, which consumes that,…
Kit Eason discusses the new value types that provide an opportunity for performance gains, the new result type which gives you access to the railway oriented programming style of error handling, and program organization and readability changes. Plus, he explores the evolution of tooling for F#, and explains how F# tooling has changed in Visual Studio 2017. To wrap up the course, he shares how you can contribute to the F# language and tooling by getting involved in the open-source community.
- Working with struct tuples
- Marking a record type as a struct value
- Marking a discriminated union as a struct type
- Using the fixed keyword to mark a value
- F# result type and associated functions
- Resolving potential naming clashes between modules and types
- Error message improvements
- The past and future of visual F# tooling in Visual Studio
- Reviewing F# tooling changes