Expand on the ability to implicitly support System.Index and System.Range for additional operations.
For example, the following would be allowed:
void Method(List list)
using System; | |
public class Person | |
{ | |
public int Age { get; } | |
public string Name { get; } | |
public Person(int age, string name) | |
: this(null, new Builder { Age = age, Name = name }) | |
{ |
public class Person | |
{ | |
public Person(int age, string name); | |
public int Age { get; } | |
public string Name { get; } | |
public virtual Person With(in Builder builder); | |
public ref struct Builder |
Expand on the ability to implicitly support System.Index and System.Range for additional operations.
For example, the following would be allowed:
void Method(List list)
Hey Mads! I wanted to give you a little sketch of one of the approaches we've been considering to help out in the var
/natural-type
space. We discussed with stephen yesterday. While not a "slam slam dunk" it def seemed to have some real upsides that made it him feel better about some things (though it also came with downsides as you'll see).
Core goals/thoughts of mine were:
[8/7/2024 12:22:34.966 PM] Log level is set to Trace (Includes Platform logs). | |
[8/7/2024 12:22:35.397 PM] | |
[8/7/2024 12:22:35.417 PM] Source code repository not available. Some features may not work as expected. | |
[8/7/2024 12:22:35.626 PM] Current list of test runtime environments: < Local Windows Environment > | |
[8/7/2024 12:22:37.851 PM] InternalLoadProjects Starting... [0] | |
[8/7/2024 12:22:38.031 PM] InternalLoadProjects Enumeration Complete in 178 ms [0] | |
[8/7/2024 12:22:38.371 PM] Enqueue operation 'OpenOperation', hashcode:36304837 | |
[8/7/2024 12:22:38.379 PM] Operation left in the the queue: 1 | |
[8/7/2024 12:22:38.379 PM] 'OpenOperation', hashcode:36304837 |
Build started at 12:01 PM... | |
1>FastUpToDate: Ignoring up-to-date check items with Kind="ImplicitBuild" (Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost) | |
1>FastUpToDate: Checking configuration Debug|AnyCPU|net6.0: (Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost) | |
1>FastUpToDate: Build acceleration is enabled for this project via a feature flag. See "Tools | Options | Environment | Preview Features" to control this setting. See https://aka.ms/vs-build-acceleration. (Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost) | |
1>FastUpToDate: Comparing timestamps of inputs and outputs: (Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost) | |
1>FastUpToDate: Adding UpToDateCheckBuilt outputs: (Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost) | |
1>FastUpToDate: D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost\Debug\net6.0\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll (Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost) | |
1>FastUpToDate: |