# C# Language Design Meeting for October 16th, 2023

## Agenda

- [Triage](#discussion)
    - [Breaking change warnings](#breaking-change-warnings)
    - [Determine natural type of method group by looking scope-by-scope](#determine-natural-type-of-method-group-by-looking-scope-by-scope)
    - [u8 string interpolation](#u8-string-interpolation)
    - [Lock statement pattern](#lock-statement-pattern)
    - [String/Character escape sequence \\e as a short-hand for \\u001b ()](#stringcharacter-escape-sequence-e-as-a-short-hand-for-u001b-)
    - [New operator %% for canonical Modulus operations](#new-operator--for-canonical-modulus-operations)

## Quote of the Day

- "If you have a ref struct as a synchronization primitive that's pretty useless" "Hey, we were discussing readonly setters today, just because it's useless doesn't mean we shouldn't do it"

## Discussion

Today we continued with triage of championed issues without a milestone.

### Breaking change warnings

https://github.com/dotnet/csharplang/issues/7189

We continue to work on this, but it was filed after our last triage session so it didn't have a milestone.

**Conclusion**: Added to the working set.

### Determine natural type of method group by looking scope-by-scope

https://github.com/dotnet/csharplang/issues/7364

We've determined this is a duplicate of https://github.com/dotnet/csharplang/issues/7429. Closing out.

**Conclusion**: Closed as a duplicate.

### u8 string interpolation

https://github.com/dotnet/csharplang/issues/7072

.NET 8 has mostly addressed this request with some JIT work to make `TryWriteUtf8` extremely efficient. The remaining work here would be allowing usage outside of that
API, and we're unsure whether the existing are addressed with this new work. We'll wait to see if the new work has sufficiently addressed requests here before proceeding
with more design work.

**Conclusion**: To the backlog.

### Lock statement pattern

https://github.com/dotnet/csharplang/issues/7104

Some initial discussion revealed that there are some split opinions in the LDM on whether we think `lock` should natively support this new type, or if a new language feature
should be used (or if it should be done via `using`). However, what's clear is that we do need to have more discussions on this in the .NET 9 timeframe, or our ability to
address this request without potential breaking changes will slip us by.

**Conclusion**: Into the working set for .NET 9 discussions.

### String/Character escape sequence \e as a short-hand for \u001b (<ESCAPE>)

https://github.com/dotnet/csharplang/issues/7400

This is one of the smallest possible language features that could possibly exist, and we're generally fine with the idea, especially as there is prior art in other languages
for `\e` as an escape (regex, for example, uses `\e` for \u001b as well). We think the existing issue is sufficiently well-specified to proceed to put this into the needs
implementation bucket of any time, open for community contribution.

**Conclusion**: Into Any Time, needing an implementation.

### New operator %% for canonical Modulus operations

https://github.com/dotnet/csharplang/issues/7599

We think this request is better served by library functions. There's a large number of potential follow-on requests here: requests for floored division, requests for
other types of remainder operations, and we don't think that adding increasing numbers of `%` or `/` characters to other operators is a sustainable path forward for these
requests, either for human understanding of the operators or for the language to continue designing. We think that extension methods are probably the best path forward for
getting an infix-style calling pattern for these operations.

**Conclusion**: Likely never.
