[Proposal] Using dictionaries as extension properties
- Dominant language
- No language data
- Stars
- 328
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
I suggest to use dictionaries as a simple value properties like this:
```VB.NET
Dim Values As new Dictionary(of String, Integer)
Sub Main()
Values("Adam") = 1 ' as usual
"Adam".Value = 1 ' extension to a literal
Dim Adam = "Adam"
Adam.Value = 1 ' extension to a variable
End Sub
```
Of course this can also used to add extension methods:
```VB.NET
Dim IncrementFuncs As new Dictionary(of String, Func(Integer))
Sub Main()
Dim Adam = "Adam"
Adam.Increment = Function(n) n + 1
Console.WriteLine(Adam.Increment(1))
End Sub
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Issue 570 contains proposal examples but names no files, entry points, or tests. Start by reading the requested dictionary-backed extension property syntax and determine the intended language behavior; done would require an accepted design with defined implementation and test scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- visualbasic
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100