Multiply with Trash - TypeScript Type Challenges #517 [EXTREME]

preview_player
Показать описание
Multiplication in TypeScript. Your head should be spinning after watching this. There's no other way to put it. It's heavy handed, full of indirection, and lacking for any sembelence of a practical application. :)

00:00 description of the challenge
01:01 thought-process for a solution
02:44 Abacus Emojil, lol
04:00 Alexsey's solution
18:13 ch3cknull's solution

Рекомендации по теме
Комментарии
Автор

Chris is a senior software engineer at Netflix with over a decade of experience. He started his career in mainframe programming, stumbled through backend development for 5 years, and eventually found his love for web dev. He enjoys keeping up with the latest tech news and trends via his twitter echo chamber, pretending he has knowledge on TypeScript, and exposing his true programming skill on Twitch (he has none). He also loves teaching others and being a helpful resource within his community.

MichiganTypeScript
Автор

I like the progression from short and limited to heavy-handed but generalized. IMO a good solution would need to 1) not rely on hard-coded values or lookup tables, 2) handle products larger than TS's tuple length limit of 999, 3) handle large inputs in bigint territory. The last solution satisfies all three, but the tuple arithmetic can be done without reversing: for that, see Issue 22399 in the type-challenges repo.

jongsuns.notions