Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# Design Notes for May 25, 2015 #3912

Closed
MadsTorgersen opened this issue Jul 12, 2015 · 2 comments
Closed

C# Design Notes for May 25, 2015 #3912

MadsTorgersen opened this issue Jul 12, 2015 · 2 comments

Comments

@MadsTorgersen
Copy link
Contributor

C# Design Meeting Notes for May 25, 2015

Agenda

Today we went through a bunch of the proposals on GitHub and triaged them for our list of features in issue #2136. Due to the vastness of the list, we needed to use some criterion to sort by, and though far from ideal we ordered them by number of comments, most to least.

Here's where we landed, skipping things that were already "Strong interest". Some are further elaborated in sections below.

  1. Method contracts <Stay at "Some interest">(Proposal: Method Contracts #119)
  2. Destructible types <Stay at "Probably never"> (Proposal: Destructible Types #161)
  3. Params IEnumerable <Stay at "Small but Useful>(Allow support for params IEnumerable<T> methods #36)
  4. Multiple returns <Addressed by tuples. Close.> (Allow multiple return values in C# #102)
  5. More type inference <Not a coherent proposal. Close> (Add more type-inferencing to C# #17)
  6. Readonly parameters and locals <Stay at "Some interest">(Proposal: 'readonly' for Locals and Parameters #115)
  7. Implicitly typed lambdas <Add at "Probably never">(Feature request: Implicitly typed lambdas #14)
  8. Immutable types <Stay at "Some interest>(#159)
  9. Object initializers for immutable objects <Add at "Some interest">(Implement property initializers for immutable types #229)
  10. First item is special <Add at "Never">([Proposal] Loops: improve first-item-is-special scenario #131)
  11. Array slices <Keep at "Interesting but needs CLR support">(Proposal: Slicing #120)
  12. Vararg calling convention <Merge with params IEnumerable>(Support the vararg calling convention in C# #37)
  13. XML Literals <Add to "Never">(Proposal: XML literals and embedded expressions in C# #1746)
  14. Local Functions <Move to "Some interest>(Proposal: Nested local functions and type declarations #259)
  15. Covariant returns <Stay at "Some interest>(Proposal: support covariant return types #357)

Params IEnumerable

This needs more thinking - let's not just implement the straightforward design. There are perf issues, for instance, around implementing through the IEnumerable<T> interface instead of arrays directly.

More type inference

Not a coherent proposal. But even if there was one, we probably wouldn't want it in C#.

Implicitly typed lambdas

These are mostly subsumed by local functions, which we'd rather do. It has some individual usefulness but not much synergy.

Object initializers for immutable objects

We want to think this together with withers, not sure what form it would take.

first item in loops is special

We recognize the scenario but it's not worthy of a feature.

vararg calling convention

Roll it in with params IEnumerable discussion for investigation.

XML literals

Never! We won't bake in a specific format.

@dsaf
Copy link

dsaf commented Jul 13, 2015

More type inference

Not a coherent proposal. But even if there was one, we probably wouldn't want it in C#.

That issue should really be renamed to "Implement global type inference". Otherwise it sounds like you are opposed to any type inference improvements, e.g. #1419, #1470 and others.

@gafter
Copy link
Member

gafter commented Apr 25, 2016

Design notes have been archived at https://github.com/dotnet/roslyn/blob/future/docs/designNotes/2015-05-25%20C%23%20Design%20Meeting.md but discussion can continue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants