In .NET languages, datatype-generic programming is typically achieved through a combination of generic type parameters and reflection, but this method suffers from the proliferation of obj values and therefore unsafe code.
In this talk, we’ll take a look at three libraries:
• TypeEquality - ahttps://github.com/G-Research/TypeEquality
• HCollections - ahttps://github.com/nickcowle/HCollections
• TeqCrate - ahttps://github.com/nickcowle/TeqCrate
We’ll show that when taken together, these libraries offer a type-safe abstraction layer over simple reflection. By using them, we can create our own libraries that are not only type-safe with respect to their public API, but whose internal implementations are completely type-safe as well.
YOU MAY ALSO LIKE:
- Lightning Talk: Existentials - Playing Hide and Seek With Your Types (SkillsCast recorded in April 2018)
- Functional Concurrency in .NET with C# and F# with Riccardo Terrell (Online Course on 28th June - 1st July 2021)
- F# eXchange 2021 (Online Conference on 20th - 21st October 2021)
- F# for a Real World E-commerce Project (SkillsCast recorded in October 2020)
- Rethinking Bioinformatic Algorithms Using F# (SkillsCast recorded in October 2020)
Type-Safe Datatype-Generic Programming in F#
Professional F# developer by day, amateur type theorist by night, Nick enjoys drawing ideas from the world of functional programming to create robust and safe software for the finance industry.