~/talk

Type Classes in C#

TalkinRussianat DotNext 2020 Piter · 2020-06-15..06-18· [dotnet, functional-programming]
links:none on file
slides:none on file

Shows how to get the benefits of C# “type classes” (a pattern not built into the language) to have both clean, generic code and runtime efficiency. Presents example code (inspired by Vlasin) that looks like ordinary code, works with arbitrary value types and collections, and approaches hand-written performance while beating interface-based solutions; also covers allocation-free LINQ, LINQ without per-iteration delegate calls, and a generic element-wise collection comparison.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03Two evils dilemma
  3. 6:10Type classes concept
  4. 9:04Goal of type classes
  5. 10:30Summing array elements
  6. 15:50Virtual calls problem
  7. 17:38Performance breakthrough
  8. 20:48Zero-size struct trick
  9. 23:03Type classes implementation
  10. 25:52Type classes future
  11. 27:41Overflow handling
  12. 29:27Indexed collections
  13. 34:09Iterable collections
  14. 37:25Iterator performance
  15. 40:37Production use case
  16. 41:42Sequence comparison
  17. 46:46Reference types handling
  18. 47:51LINQ alternatives
  19. 50:17Performance tips
  20. 51:41More use cases
  21. 52:48Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.