4 ms·
Thanks for the explanation. I've been programming for many years, and your examples make total sense to me, but reading sentences like "Control flow analysis fo
by dekerta 5y ago
Thanks for the explanation. I've been programming for many years, and your examples make total sense to me, but reading sentences like "Control flow analysis for destructured discriminated unions" make me feel like a total impostor
- coolgoose 5y agoYou and me both buddy, you and me.
- dgritsko 5y agoI think most of us would feel like impostors next to Anders Hejlsberg.
- codyb 5y agoIt’s just like any other programming problem, break it into parts, and build it back up again. “What’s a union?” “Okay… then what’s a discriminated union?” “Okay… let’s apply destructuring to one…” “Okay… now what would analysis look like there given what I know?” “Okay… how do we have the computer know what I know intuitively as a human given this context?” “Okay! I think I got it!” :-). If you’ve gotten this far with programming to understand the examples above, my guess is if you just take the time you can do it without the examples if you take it in small enough chunks :-). Life’s all about what you apply your energy too (And also, wonderful example :-) )
- debaserab2 5y agoI know you're entirely right, but sometimes when I see things like this in Typescript... https://github.com/sindresorhus/type-fest/blob/main/source/require-at-least-one.d.ts#L25-L35 https://github.com/sindresorhus/type-fest/blob/main/source/r... I can walk through it with enough pause, but it kinda makes my head implode when I glance at it.
- JZumun 5y ago{ [Key in KeysType]-?: ... } TIL that you can disable ? and readonly in mapped types using -. So in the above code, every Key will be mandatory (-?) even if the original one in KeysType was optional. source: https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#mapping-modifiers https://www.typescriptlang.org/docs/handbook/2/mapped-types....
- codyb 5y agoYea it’s like reading Shakespeare… I can read the words and know what most of them mean… but damn if it doesn’t take serious energy to actually parse out the meaning sometimes. I guess in a way, the issue is that it is cloaked with familiarity. Your brain gets so used to understanding sentences on first go it’s not used to not understanding it. However, if it was a chemistry equation and you weren’t familiar with chemistry it would immediately understand that comprehension would take time and thus the mind implosion due to a lack of understanding doesn’t occur.