Тёмный

@rae: How to choose between Typeable, Data, and Generic in Haskell 

Tweag
Подписаться 4,6 тыс.
Просмотров 3,2 тыс.
50% 1

I review GHC's three mechanism for type-aware programming -- Typeable, Data, and Generic -- covering what they do and how to choose between them.
Find me at richarde.dev/ or on Twitter at @RaeHaskell
Video index at richarde.dev/v...

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 11   
@RubenMoor
@RubenMoor Год назад
Ok, I tried out `eqTypeRep` and `==`. The simple == doesn't work for this example, but it might be OK in other cases. Using `eqTypeRep`, the type equality becomes visible to the compiler. Using the Eq instance of `TypeRep` implies that the type equivalence isn't available at compile-time, only at runtime and thus I can't use the fact that x is an `Int` later in the code.
@charliebevis6310
@charliebevis6310 2 года назад
I've looked at scrap your boilerplate countless times, but this `everywhere` example was so painless! Thank you Richard Eisenberg!
@saeidakbari4788
@saeidakbari4788 Год назад
Excellent! BTW, what is the VS Code extension you're using that gives you GHCi access inside the editor? I really need this kind of REPL :)
@tiziano88
@tiziano88 Год назад
Thanks, this was the best video on the topic that I could find, very useful and to the point, with enough pointers to look deeper into specific aspects for anyone interested
@tweag
@tweag Год назад
Glad it was helpful!
@raehik
@raehik 2 года назад
Thanks for this video. Generic programming *terrified* me until I had a go and wrote some generic binary codecs (a la Aeson but for binary data). Made me a lot more comfortable with all the type level features of Haskell, and removed my fear of UndecidableInstances. The sort of high level algebra you're forced into feels like the real meat of Haskell, stuff you can't do in other languages (at least not with the same safety guarantees). When the code you're writing is directed by the structure of the type(s) involved, you can likely exploit Generic.
@holdenmcgroin8917
@holdenmcgroin8917 2 года назад
Very useful! I'm always confused about these seemingly similar concepts. The explanations are so clear!
@yooviyo
@yooviyo 2 года назад
Amazing, thank you! You've gained a new subscriber.
@tweag
@tweag 2 года назад
Thanks and welcome
@jackkensik7002
@jackkensik7002 2 года назад
awesome video keep it up!
@mooncop
@mooncop 2 года назад
👏
Далее
Higher-order Type-level Programming in Haskell
21:28
Просмотров 3,6 тыс.
Andrew Kelley   Practical Data Oriented Design (DoD)
46:40
Being Competent With Coding Is More Fun
11:13
Просмотров 82 тыс.
The Nix Hour #78 [Writing packages]
1:01:54
Просмотров 477
Coding Was HARD Until I Learned These 5 Things...
8:34
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
Brutally honest advice for new .NET Web Developers
7:19
From C ➡️ C++ ➡️  Rust
14:06
Просмотров 169 тыс.
Full Stack Developers will take over. This is why.
11:26