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:
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.