.NET
The Switch Keyword in C# is a LIE! (via Nick Chapsas)
- If you have sequential numerical values (e.g., 1, 2, 3) as case statements, the low-level C# looks identical, and the IL implements the switch as a jump table. If you have non-sequential values (e.g., 10, 20, 30), the IL looks very different, and the low-level C# essentially implements a binary search with if-statements.
- If you use a switch expression on sequential numerical values, the low-level C# looks like a traditional switch statement.
- If you switch against sequential characters, the compiler does some interesting optimizations to use character code differences. It also happens when when you have seven or more cases.
Technology
The New GitHub Copilot X Powered by GPT-4 is Here! (via Nick Chapsas)
- Everything in your IDE is in scope.
- There is a wait list.
- Features: explain a regex, find and fix bugs, help generate tests, generate pull requests.