What were they thinking? Language design choices that seem wrong, until they don't.
summary
C# makes specific tradeoffs: it enforces no fall-through in switch to keep refactoring safe and enable pattern-matching; it adds local functions avoid delegate allocation by emitting private methods so recursion is simple and allocations drop; it rejects XML literals to avoid binding the language to an external standard; using var preserves IQueryable composability (casting to IEnumerable causes full materialization and extra DB trips); partial classes let tests add interfaces to tool-generated DbContext for mocking.
AI-written summary · about
chapters (7)
- 0:00Start
- 3:44case block is executed.
- 6:26definition of functions inside
- 13:02XML literals makes C#
- 16:33strongly typed.
- 24:32the same name
- 37:54resolution is simplified.
related talks
41mWhat’s Next in C#
45mLowering in C#: What's really going on in your code?
42mA Game of Theories: Why languages do what they do
15mYou Might Not Need Classes
47mA Game of Theories: why languages do what they do
26mBack to the Future of JS II
25mBack to the future of JS II: Beyond what we can foresee
31mBack to the future of JS: the next features and amazing proposals
