Join Kit Eason for an in-depth discussion in this video Implicit module suffix, part of What's New in Visual Studio 2017 for F# For Developers.
- [Instructor] Okay well the amount of effort…we're going to need to put in…to understanding these F# 4.1 features…is going down all the time.…This one is even easier.…You actually don't need to do anything at all.…We're talking about so called implicit module syntax…and to understand that, let's first look at some code…in Visual F# 2015.…Here we're obviously looking at F# 4.0…and we're looking at a situation…where we want to have a module called, in this case, stuff…and also a type also called stuff.…Now it doesn't matter what's in the module,…it doesn't matter what the type does,…the point is that it is sometimes valid…to want to call two things of different types…in this way the same name…and as you can see on line seven we got a compiler error…that says duplicate definition…of type, exception, or module stuff.…
Now if there was an attribute you could put on the module…to work around this called compilation representation…but it doesn't work in all scenarios…and in fact it doesn't work in this scenario…because you have to have your type and your module…
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