From e558edb60b483730469525d72921470064c67392 Mon Sep 17 00:00:00 2001 From: Gauthier Segay Date: Sun, 30 May 2021 18:55:46 +0200 Subject: [PATCH] Add a couple of unresolved questions (delegate support, type checking performance consideration) (#576) --- .../FS-1095-requirenamedargumentattribute.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drafts/FS-1095-requirenamedargumentattribute.md b/drafts/FS-1095-requirenamedargumentattribute.md index 88e5789f..3b461ea4 100644 --- a/drafts/FS-1095-requirenamedargumentattribute.md +++ b/drafts/FS-1095-requirenamedargumentattribute.md @@ -78,36 +78,52 @@ Code would still compile but the rule won't be enforced. Code would still compile but the rule won't be enforced. -# Unresolved questions +# Unresolved / Resolved questions Whether the attribute would find a way to the BCL and support by other compilers. +> See [dotnet/runtime/issue#51451](https://github.com/dotnet/runtime/issues/51451) + Does the compiler errors if the attribute is used on a function? or a warning? or ignored? What happens when the attribute is put on a virtual method but not on an overriden one? +> No surprise: it should still not type check if calls aren't made with named argument syntax. + What happens when the attribute is put on a method defined in an interface but not on the implementation? What happens with optional parameters? +> No surprise: they are still optional + Should the feature support applying the attribute to only a subset of arguments, on argument by argument basis as well? How does it play out with restriction about named arguments coming last in the call site? +> No. + +Is there an impact / support for delegate types (and later, function pointers)? + +Is the impact on type checking (checking one attribute per constructs supporting the attribute) significant + # Appendix ## Language Zoo +### Smalltalk ```smalltalk 'hello world' indexOf: $o startingAt: 6 ``` +### Objective-C ```objectivec [helloWorldString indexOf: o startingAt: 6]; ``` +### C# ```csharp "hello world".Substring(startIndex:1); ``` +### F# ```fsharp "hello world".Substring(startIndex=1) ``` \ No newline at end of file