Commit graph

513 commits

Author SHA1 Message Date
David Pine 9b736b5b73
Update the ranges.md file to correctly represent the actual impl. (#3645) 2020-07-07 10:51:45 -04:00
Jay c4f7854f1c Added mention ??= rules 2020-07-07 09:48:49 -04:00
Jay 0d8b6b6596 Added Pointer-null-coalescing.md 2020-07-06 17:42:09 -04:00
Rikki Gibson 9ae50fad18 Fix filename 2020-07-06 13:01:17 -07:00
Rikki Gibson ad8e804774
Update repeat-attributes.md 2020-07-06 12:54:09 -07:00
AlekseyTs ce26928a60
Clarify some aspects of inheritance and equality for records (#3634) 2020-07-02 14:16:03 -07:00
Rikki Gibson ec49f96cb7
Update repeat-attributes.md 2020-07-02 13:53:22 -07:00
Rikki Gibson 0cab9c586a
Update repeat-attributes.md 2020-07-02 13:52:17 -07:00
Fred Silberberg 1bb454804d
Update the calling convention and UnmanagedCallersOnly attribute. (#3441)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2020-07-01 15:02:01 -07:00
Fredric Silberberg 2ca2a15434
Fix typo. 2020-07-01 15:01:18 -07:00
Fredric Silberberg 07582155a4
Update the calling convention sections with feedback from internal design, LDM decisions, and PR feedback. 2020-06-30 16:05:25 -07:00
Charles Stoner 413c55fe88
Override abstract property get and init accessors (#3626) 2020-06-30 10:53:26 -07:00
Petr Kulikov 6f244db799
Fix typo in tuple equality proposal (#3614) 2020-06-25 11:42:58 -07:00
Julien Couvreur b901db48de
Update static-lambdas.md 2020-06-24 14:00:36 -07:00
Rikki Gibson aa2d828c82
Update module-initializers.md (#3604) 2020-06-23 15:23:17 -07:00
Andy Gocke 7c44a62f9a
Add nullable spec for nested functions 2020-06-22 15:07:55 -07:00
Charles Stoner d48f35e584
Records: update "Equality members" spec section (#3583) 2020-06-19 14:20:47 -07:00
Kevin Sun eb00bb077e
Add constant interpolated strings (#3581)
* Create constant_interpolated_strings.md

* Update constant_interpolated_strings.md

* Update constant_interpolated_strings.md

* Update constant_interpolated_strings.md

* Update constant_interpolated_strings.md

* Update constant_interpolated_strings.md
2020-06-18 09:43:38 -07:00
Fred Silberberg aa2ff4d18a
Add spec for extension GetEnumerator (#3576)
* Add extension GetEnumerator spec.

* Add await foreach note
2020-06-17 16:40:02 -07:00
Hiroshi Yoshioka 538df2e3c3
Typo "***" (#3405)
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-8.0/nullable-reference-types-specification
2020-06-17 08:30:02 -07:00
Rikki Gibson c90824ed24
Create repeat-attributes.md 2020-06-12 16:59:32 -07:00
Charles Stoner 3bfb6f875a
Update record equality specification (#3552) 2020-06-10 12:16:37 -07:00
AlekseyTs 0e42c53aa5
Clarify some aspects for record constructors (#3548) 2020-06-10 08:46:46 -07:00
Andy Gocke 5c9b8f27bd
Update records.md (#3547) 2020-06-08 14:01:34 -07:00
Andy Gocke 100d3f7f04
Bring records proposal up to date (#3527)
Try to bring the proposal in line with LDM decisions. Inheritance is somewhat described, but there
have been no affirmative decisions by LDM so this is still in flux
2020-06-04 12:18:43 -07:00
Andy Gocke 6c404867b9
Add spec for nominal records (#3520) 2020-06-02 14:21:18 -07:00
Neal Gafter 41e377c7fa
Update target-typed conditional expression spec. (#3503) 2020-05-31 14:29:44 -07:00
Andy Gocke ae11413106 Move old records proposals to rejected/ and rename current proposal 2020-05-30 12:24:13 -07:00
Andy Gocke 04f998e2f9
Update records-wip.md (#3505) 2020-05-30 12:21:00 -07:00
Andy Gocke 300226c009
Update spec for record value equality (#3396) 2020-05-24 12:25:51 -07:00
Neal Gafter e355841daa
Update target-typed-conditional-expression.md
Adjust specification.
2020-05-21 14:53:19 -07:00
Neal Gafter 125539b88d
Add doc for C# 6.0 struct autoprop initialization (#3459) 2020-05-18 16:36:57 -07:00
Jaliya Udagedara c2df2ee72f
Update constructor parameters (#3466) 2020-05-17 10:12:44 -07:00
Matt Styles c2fe8f1d15
Updated status of null coalescing assignment from proposed to implementation completed (#3451)
* Updated status of null coalescing assignment from proposed to implementation completed

The feature is available in C# 8. I can't see guidance on what should be updated in these docs to reflect that, so not sure if what I've changed is what should be changed!

* Update null-coalescing-assignment.md

Marking all stages of null coalescing assignment proposal as completed with checkbox filling
2020-05-12 14:41:23 -07:00
AlekseyTs c657de69f5
Providing access to command line arguments within top-level statements 2020-05-09 09:43:55 -07:00
Fred Silberberg d073319400
Update proposals/function-pointers.md
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2020-05-08 23:16:08 -07:00
Fredric Silberberg fc347a5739
Update the calling convention and UnamangedCallersOnly attribute. 2020-05-08 16:14:30 -07:00
Neal Gafter a17f4c8ba8
constant pattern is a constant expression. 2020-05-06 14:13:20 -07:00
Neal Gafter c9ae01e03b
Update target-typed-conditional-expression.md 2020-05-05 16:16:39 -07:00
Neal Gafter 347c6665f7
Update target-typed-conditional-expression.md 2020-05-05 16:15:36 -07:00
Alireza Habibi e006b4808d
Permit init-only initialization in attribute usages (#3425) 2020-05-05 12:47:03 -07:00
Andy Gocke c30039481e
Update records-wip.md (#3353)
Add info for the `with` expression
2020-04-30 10:28:24 -07:00
Rikki Gibson 0cec4e00c3
Module initializers (#3392)
Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
2020-04-30 10:03:12 -07:00
Julien Couvreur ab0873759f
Update init.md 2020-04-26 08:55:22 -07:00
Julien Couvreur cbf73854a6
Tweaks to init-only speclet (#3398) 2020-04-26 08:28:51 -07:00
Neal Gafter f1d43aade5
Move specification from #2844 to proposals. (#3394) 2020-04-24 16:58:39 -07:00
Rikki Gibson 64566a1688
Update extending-partial-methods.md (#3386) 2020-04-23 13:06:39 -07:00
Julien Couvreur fea3e4f374
Update modreq type name 2020-04-22 15:34:43 -07:00
Julien Couvreur 356ee04506
Rename simple programs (#3382) 2020-04-22 10:38:05 -07:00
David Pine 7f1c2a6fe4
Added details and examples for null guard guidance (#3381)
* Added details and examples for null guard guidance

* Update proposals/csharp-8.0/nullable-reference-types.md

Co-Authored-By: Bill Wagner <wiwagn@microsoft.com>

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
2020-04-22 13:11:13 -04:00
Jared Parsons 5c7cc61921
Extending partial methods (#3379)
* Copy from LDM proposal

* Partial Methods

* Put document in right directory

* Cleanup

* Typo

* Apply suggestions from code review

Co-Authored-By: Joseph Musser <me@jnm2.com>

Co-authored-by: Joseph Musser <me@jnm2.com>
2020-04-22 09:39:24 -07:00
Jared Parsons 3f177e90b1
Init only proposal document (#3367)
* Really rough draft

* modreq vs. attributes

Finished up the section detailing using attributes vs. modreq. Decided
to make it an open question for now vs. a consideration. I felt less
strongly about it after writing it. I still do feel quite passionate
though about this with validators.

* Summary and motivation added

Got the basic summary and motivation added. Feeling good about the
premise here.

* Detailed design section

This ended up persuading me that `init` should be on the `set` method,
not the property itself. There is just too much in common with the
`readonly` modifier here. Plus if we ever decide to include the concept
of `init` members as a general feature then `init` would be required to
be on the `set`.

* Encoding discussions written

* Almost there

* Initial draft completed

* Remove init type modifier

After discussion in LDM we've decide against this as a feature. Reasons
captured in the document.

* Updated all notes

* Respond to LDM decisions

This updates to the following two LDM decisions:
1. Disallow `init` on fields
1. Use `init` instead of `init set`

* Cleaned up emit scenarios

* Apply suggestions from code review

Co-Authored-By: Fred Silberberg <fred@silberberg.xyz>

* Addressed some feedback

* Finish up PR feedback

Finish up the PR feedback on the proposal

* Typo

* PR feedback

* Apply suggestions from code review

Lots of typos 😄

Co-Authored-By: Tiago César Oliveira <4922781+tiagocesar@users.noreply.github.com>
Co-Authored-By: Patrick Westerhoff <PatrickWesterhoff@gmail.com>
Co-Authored-By: Steve Ognibene <steve.ognibene@namely.com>
Co-Authored-By: Viacheslav Ivanov <viacheslav.ivanov@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Julien Couvreur <jcouv@users.noreply.github.com>
Co-Authored-By: Fred Silberberg <fred@silberberg.xyz>

Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
Co-authored-by: Tiago César Oliveira <4922781+tiagocesar@users.noreply.github.com>
Co-authored-by: Patrick Westerhoff <PatrickWesterhoff@gmail.com>
Co-authored-by: Steve Ognibene <steve.ognibene@namely.com>
Co-authored-by: Viacheslav Ivanov <viacheslav.ivanov@gmail.com>
Co-authored-by: Julien Couvreur <jcouv@users.noreply.github.com>
2020-04-20 20:52:29 -07:00
Fred Silberberg 71a1696e3a
Add metadata representation section for in and out (#3368) 2020-04-20 13:56:28 -07:00
Neal Gafter a993c653f5
Add proposal for target-typed conditional expression. (#3363) 2020-04-20 11:46:15 -07:00
Neal Gafter 6901635c38
Add draft spec for C# pattern-matching changes. (#3361) 2020-04-17 16:03:52 -07:00
AlekseyTs 1ecebc412f
Allow returning an integer from a Simple Program (#3342) 2020-04-17 10:20:23 -07:00
Charles Stoner 583bdd220f
Native-sized integers proposal (#2833) 2020-04-14 12:39:37 -07:00
Andy Gocke 88202acd40
Update with expression in records-wip 2020-04-10 12:34:23 -07:00
Fred Silberberg 52624f54c0
Update function pointers proposal for binary operators. (#3348)
* Update function pointers proposal for binary operators.

* Update wording per feedback.
2020-04-09 14:33:18 -07:00
Andy Gocke 7f0c8e4eac
Keep parameterless record struct constructors 2020-04-07 17:29:48 -07:00
Andy Gocke 9143a30162
Update records-wip.md 2020-04-06 16:57:07 -07:00
Andy Gocke 1cca522b9b
Update records-wip.md 2020-04-06 16:56:29 -07:00
AlekseyTs 75ddc88a40
Limit top-level statements to a single compilation unit within a program (#3292)
Reflect LDM decision made on 2020-03-09 to limit top-level statements to a single compilation unit within a program.
2020-03-25 16:28:26 -07:00
Neal Gafter 64da1dcf00
target-typed new: reflect LDM decisions 2020-03-25 (#3311) 2020-03-25 15:40:49 -07:00
Andy Gocke 23172a7c6d
Add 'with' expression to the spec (#3282) 2020-03-25 15:36:47 -07:00
Neal Gafter 74c38d2950
Clean up the specification portion of target-typed new (#3310) 2020-03-25 10:06:34 -07:00
Julien Couvreur 7ea0b8e328
Update target-typed-new.md 2020-03-25 07:13:54 -07:00
Julien Couvreur 1f45494dec
Throw new() is allowed 2020-03-25 07:11:57 -07:00
Julien Couvreur 40bf00abdf
Update target-typed-new.md 2020-03-24 08:48:10 -07:00
Petr Kulikov cf22e016c7
Ranges proposal: fix typos (#2836) 2020-03-23 08:42:41 -07:00
Neal Gafter 3fa28e4b54
Update shadowing-in-nested-functions.md 2020-03-19 17:39:49 -07:00
Fred Silberberg 45a1455732
Only allow static methods for applicable members (#3281)
* Only allow static methods for applicable members

This fixes a very similar problem to https://github.com/dotnet/csharplang/issues/3277, where this code is unable to be resolved:
```cs
interface I1{}
interface I2{}

public unsafe class C : I1, I2 {
    void M(I1 i) {}
    static void M(I2 i) {}
    public void M1() {
        delegate*<C, void> a = M; // Ambiguous because both M's are applicable
    }
}
```
With this change, the instance method M is not applicable, so there is no ambiguity.
2020-03-19 12:56:34 -07:00
Julien Couvreur a6c38525c2
Update target-typed-new.md (#1989) 2020-03-19 11:44:21 -07:00
Rikki Gibson 51e8d545c7
Add draft spec for local function attributes (#3198) 2020-03-17 13:58:50 -07:00
Neal Gafter 70a7286fac
Add placeholder specs for two features from C# 7.0 (#3270) 2020-03-16 18:23:28 -07:00
Bill Wagner 5688b13e66
clarify readonly set (#3266)
Fixes dotnet/docs#13841

I added a note (first recommendation) but did not make any additions for the second. That's covered in more of the tutorials and conceptual docs.
2020-03-13 09:48:25 -04:00
Fred Silberberg f3170512e7
Add conversions spec for function pointers (#3263)
* Add conversions spec for function pointers.

* Fix typo

Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
2020-03-11 14:33:34 -07:00
Neal Gafter 21b0400850
Add placeholder documents for missing specifications. (#3261) 2020-03-11 11:48:23 -07:00
LouisFr81 5278336b61
Update tuple-equality.md (#2204) 2020-03-10 12:09:55 -07:00
Zhiliang Xu 3cb286fe1d
Fix a grammar issue (#3176) 2020-03-10 12:08:19 -07:00
Alexander Köplinger f530e937c5
Fix typos in function pointers proposal (#3238)
- Preventing -> Presenting
- Fix markdown link
2020-03-02 15:46:09 -08:00
Andy Gocke 2a6dffb607
Add spec for equality (#3189) 2020-02-29 14:21:55 -08:00
AlekseyTs 36b028f4d6
Clarify implicit nature of an async context within top-level statements 2020-02-14 15:24:47 -08:00
AlekseyTs e0031c5139
Add proposal for "Simple programs" feature (#3159) 2020-02-06 10:33:11 -08:00
Andy Gocke 19bc0f521e
Update records-wip.md (#3106) 2020-01-27 12:58:42 -08:00
Maher Jendoubi 02b535d712 Contributing: fix typos (#3125) 2020-01-24 18:22:11 -05:00
Julien Couvreur 6f24703c82
var infers a nullable type (#3097) 2020-01-21 22:49:40 -08:00
Andy Gocke e134bb7058
Add spec work for record ctor (#3076)
* Add spec work for record ctor

* Add more detail about constructor implementation
2020-01-15 16:40:26 -08:00
Maira Wenzel f61a06970f
Fix broken links (#3091)
* Fix broken link

* update/fix links

* fix broken link
2020-01-13 16:31:13 -08:00
Andy Gocke 162ba7ba85
Update records-wip.md 2020-01-02 22:40:04 -05:00
Andy Gocke 0546ee1a16
Update records-wip.md 2020-01-02 22:36:27 -05:00
Andy Gocke 2b894dc9aa
Add draft spec for records, as approved 2020-01-02 22:35:04 -05:00
Julien Couvreur 42ef673ecc
Create speclet for lambda discard parameters (#2901) 2019-12-13 13:43:29 -08:00
Mads Torgersen 1a1ee9e673
Merge pull request #3023 from dotnet/design-notes
Add design notes README for 2020
2019-12-13 12:17:28 -08:00
Neal Gafter 32abf01f2e
Add spec for nested stackalloc (#3010) 2019-12-06 16:50:21 -08:00
Fred Silberberg 08e94b3029
Update function pointer proposal with LDM changes (#2923)
* Update function pointer proposal with LDM changes

* Remove unnecessary section about calling convention
2019-11-18 09:44:24 -08:00
Neal Gafter e14bb331fd
Update DIM proposal to forbid class declared within variant interface. (#2967) 2019-11-15 17:04:28 -08:00
Andy Gocke 5983461e05 Add proposal for discriminated unions 2019-11-14 16:40:28 -08:00
Julien Couvreur f466a1415f
Remove mentions of safeonly context (#2900) 2019-10-29 14:18:56 -07:00
Bill Wagner b8f1103eb6
remove locale (#2915)
These two links both contained the "en-us" locale. That directs  readers to the English version, rather than the localized version based on their browser environment.
2019-10-29 09:33:40 -04:00
Charles Stoner 1b488e76c2
Add static local functions proposal (#2891) 2019-10-24 09:55:41 -07:00
Julien Couvreur e9afb74cc1
Create static-lambdas.md (#2899) 2019-10-22 10:11:01 -07:00
Andrew Arnott da1180f7ea Fix typo/grammatical error 2019-10-04 15:30:49 -07:00
Neal Gafter 5dd11df697 Update spec for pattern-matching in C# 8.0. 2019-10-04 15:22:27 -07:00
Jared Parsons da452002c3
Merge pull request #2829 from jaredpar/fix-safety
Span safety samples
2019-09-27 12:55:48 -07:00
Bill Wagner 65ea1e6dc0
fold ranges changes into initial spec (#2797)
* fold ranges changes into initial spec

See https://github.com/dotnet/docs/issues/12772#issuecomment-501451870

This will read better as a coherent story for the Range and Index features as delivered.

* update the description of Slice.

* update precedence rules for range expression.

* Simplify language to move from a proposed design to a spec

This removes some of the history and concerns with the previous design.
2019-09-27 09:40:00 -07:00
Jared Parsons 1c68f302ab Span safety samples
Include same samples and explanations for why several of the `Span<T>`
and `ref struct` rules exist.
2019-09-26 10:47:52 -07:00
Fred Silberberg e1cdd0e5ff
Updates to the function pointers spec. (#2812)
* Updates to the function pointers spec.
2019-09-23 11:28:14 -07:00
Mads Torgersen 93cec651e3 Merge branch 'master' into design-notes 2019-09-12 16:02:09 -07:00
Julien Couvreur 4930dbd0f0
Merge pull request #2391 from MihaZupan/master
Fix typos in format proposal
2019-09-10 14:32:16 -07:00
AlekseyTs 568e8b0dfc
default-interface-methods.md: Adjust dependency rules for types in "Binding base clauses" section. (#2785) 2019-09-05 16:50:16 -07:00
Youssef Victor 3211a34eac typo (#2705) 2019-08-27 19:27:42 -07:00
Mads Torgersen 68462ba9c5 Merge branch 'master' into design-notes 2019-08-26 13:14:56 -07:00
Leonid Tsarev af27912886 Update recordsv2.md (#2717)
Seems according to prev. text that "final generated code" should have `[WithConstructor]` attribute on `With` method. It's omission, isn't it.
2019-08-08 13:32:29 -04:00
Julien Couvreur f7952cdddf
Update target-typed-default.md 2019-07-30 13:23:29 -07:00
Andy Gocke 856c335cc5 Add new "nominal" records proposal 2019-07-29 18:39:10 -07:00
Mads Torgersen 27487fa029
Create primary-constructors.md 2019-07-23 15:31:23 -07:00
Julien Couvreur 098f046a76
Move Ranges proposal to csharp-8.0 folder (#2594) 2019-06-12 14:08:21 -07:00
Fred Silberberg 5a88d5432d
Merge pull request #2591 from 333fred/update-null-coalescing
Update ??= proposal with changes from LDM
2019-06-11 14:18:13 -07:00
Fredric Silberberg edddfb9e5d
Update ??= proposal with changes from LDM 2019-06-11 14:16:17 -07:00
Julien Couvreur 1f8c618f4b
Move DIM and readonly member proposals to C# 8 folder (#2592) 2019-06-11 13:32:10 -07:00
Mads Torgersen d303e32fea Update nullable-reference-types-specification.md 2019-05-29 14:52:23 -07:00
Nick Schonning 6cd82c21ed fix: MD033/no-inline-html
Inline HTML get swallowed in MD and HTML rendering
2019-05-25 01:31:46 -04:00
Fred Silberberg a98bdb81b4
fix: MD038/no-space-in-code (#2423)
fix: MD038/no-space-in-code
2019-05-23 18:06:50 -07:00
Fred Silberberg 8152182f0a
Fix spelling mistake (#2487)
Fix spelling mistake
2019-05-23 10:30:18 -07:00
Fred Silberberg 31bd4e65fc
typo: Double word "the" (#2426)
typo: Double word "the"
2019-05-23 10:28:06 -07:00
Mitch Bodmer 44b02c7ea2
Fixed link. 2019-05-15 11:10:46 -07:00
Jan Kotas c4937c7e6c
Extensible set of unmanaged calling conventions (#2432) 2019-05-14 15:51:21 -07:00
Bill Wagner ba519de468
Return storage that exists (#2523)
* Return storage that exists

Fixes #12301

* Update proposals/csharp-7.2/readonly-ref.md
2019-05-13 18:12:24 -04:00
Rikki Gibson e2b6b9c497 Fix typo 2019-05-10 15:32:00 -07:00
Bill Wagner df7104b072 Add base interfaces to declarations (#2461)
In the modified sample, I think these base interfaces were missing.
2019-05-08 09:22:50 -07:00
Rich Lander 759bdd3c56
Fix spelling mistake 2019-05-04 20:32:51 -07:00
Julien Couvreur bec6e78996
Document [EnumeratorCancellation] attribute (#2458) 2019-04-20 11:32:44 -07:00
Andy Gocke c3de968750
Design changes for pattern index/range (#2446) 2019-04-17 00:46:15 -07:00
Nikita Potapenko 2027b149eb Fix link (#2437)
Fixes #11829
2019-04-15 14:43:47 -07:00
Nick Schonning 00de1a1c74 typo: Double word "the" 2019-04-13 14:44:05 -04:00
Nick Schonning 870cc06bea fix: MD038/no-space-in-code
Spaces inside code span elements
2019-04-13 14:23:40 -04:00
Patrick Westerhoff 1262e7f1f7 Fix duplicate part from suggestion 2019-04-08 23:58:03 +02:00
Jared Parsons c229cae634
Merge pull request #2397 from jaredpar/fix-range
Proposed changes to Index / Range
2019-04-08 08:57:38 -07:00
Jared Parsons 2a61adc3c0
PR feedback 2019-04-08 08:56:51 -07:00
Patrick Westerhoff 0071f73885
Apply suggestions from code review
I asked, @poke delivered.

Co-Authored-By: jaredpar <jaredpparsons@gmail.com>
2019-04-05 16:47:51 -07:00
Bill Wagner 0216f6a7ec
Apply suggestions from code review
Co-Authored-By: jaredpar <jaredpparsons@gmail.com>
2019-04-05 12:54:59 -07:00
Jared Parsons 3e4c165a3c
Update proposal based on LDM 2019-04-05 08:41:10 -07:00
Miha Zupan 0a9af0f248
Fix typos in format proposal 2019-04-04 14:58:14 +02:00
Neal Gafter 2d10906508
Update default-interface-methods.md
Add rule that an interface may not depend on itself.
2019-04-02 17:50:01 -07:00
Neal Gafter 46d1499c77
Update default-interface-methods.md
Add a rule to break cycles while binding an interface's base clause.
2019-04-02 17:06:18 -07:00
Jared Parsons 8dd6726126
First draft 2019-03-31 20:39:22 -07:00
Jared Parsons 7e4658dde1
Target typed new write up 2019-03-31 19:03:26 -07:00
Jared Parsons a797e9dc95
Rough outline 2019-03-31 16:00:29 -07:00
Maira Wenzel afe6679f71
Change link to https 2019-03-08 17:42:08 -08:00