Source Generators for free!
Eirik Tsarpalis' blog
by eirik
1M ago
If you’re a seasoned .NET library author, there is a good chance that you’ve had to write some component that is acting on arbitrary user-defined types. This includes serializers, structured loggers, mappers, deep cloners, validators, parsers, random value generators, equality comparers, and many more. Such components typically focus on the data exposed by user types ..read more
Visit website
Effect Programming in C#
Eirik Tsarpalis' blog
by eirik
4y ago
Programming with algebraic effects and handlers, a method for reasoning about computational effects of programs that originates from functional programming research, has recently found increasing adoption in more mainstream languages. Implementations can be found in OCaml, Haskell, Scala, F# and the Koka language. Algebraic effects are an immensely powerful language feature that can be used to implement a diverse array of features such as dependency injection, cancellation, nondeterminism, debug tracing, first-class continuations and replayable computations. For a beginner’s introduction to th ..read more
Visit website
Applying the Tagless-Final pattern in F# Generic Programs
Eirik Tsarpalis' blog
by eirik
5y ago
A few years back, I blogged about how one could use the TypeShape library for writing practical generic programs in F#. While the library has seen success in both OSS and proprietary applications, from the beginning there have existed pretty self-evident usability issues when working with the library itself. On simple inspection of a basic example one can easily detect the following problems: Accessing generic types requires extensive use of visitors which result in awkward looking code, which is hard to read and hard to write. The type checker can hardly handle such expressions, and explicit ..read more
Visit website

Follow Eirik Tsarpalis' blog on FeedSpot

Continue with Google
Continue with Apple
OR