Skip to content

Commit fc302ac

Browse files
Added section for scope
1 parent d2f026c commit fc302ac

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

1-Draft/RFC0014-Language enhancements for collections.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
RFC: RFC0014
33
Author: Aditya Patwardhan
44
Status: Draft
5-
SupercededBy:
5+
SupercededBy:
66
Version: 1.0
77
Area: LanguageAndParser
88
Comments Due: 02/01/2017
99
---
1010

11-
# Language enhancements for collections
11+
# Language enhancements for collections
1212

13-
System.Collections namespace has many collections that are frequently used in PowerShell scripts. To instantiate objects of these classes, New-Object and the type name has to be used. With Powershell v5 and above the ```[typename]::new() ``` can be used, by still needs the full type name. This RFC proposes a way to simplify the instantiation of types in System.Collections namespace.
13+
System.Collections namespace has many collections that are frequently used in PowerShell scripts. To instantiate objects of these classes, New-Object and the type name has to be used. With Powershell v5 and above the ```[typename]::new() ``` can be used, by still needs the full type name. This RFC proposes a way to simplify the instantiation of types in System.Collections namespace.
1414

1515
## Motivation
1616

@@ -20,7 +20,7 @@ The various ways user can instantiate these classes currently is as follows:
2020
$list = New-Object System.Collections.ArrayList
2121
$list = [System.Collections.ArrayList]::new()
2222
```
23-
Collections are used frequently in PowerShell scripts, we can make the instantiating collections easier.
23+
Collections are used frequently in PowerShell scripts, we can make the instantiating collections easier.
2424

2525
Performing a search on GitHub for usage of collections we know which collection type is used more frequently.
2626

@@ -65,10 +65,14 @@ $stack = [stack] @(1,2,3)
6565

6666
### New operator for list, queue and stack
6767

68-
A new operator can be proposed which creates a list, say @[] / @<> etc. This would mean we would need to make changes to the Parser to support the new operator. Since all the collections are single dimensional and an array operator is very familiar to users, adding a new operator would have a learning curve and discoverability issue.
68+
A new operator can be proposed which creates a list, say @[] / @<> etc. This would mean we would need to make changes to the Parser to support the new operator. Since all the collections are single dimensional and an array operator is very familiar to users, adding a new operator would have a learning curve and discoverability issue.
6969

7070
### Alternative names for collections
7171

72-
The RFC proposes to use list, queue and stack for System.Collections.ArrayList, System.Collections.Queue and System.Collections.Stack respectively. Type accelerator names for Queue and Stack are same as class names.
73-
Using 'list' is proposed for System.Collections.ArrayList instead of 'ArrayList' for brevity, 'ArrayList' is too long.
72+
The RFC proposes to use list, queue and stack for System.Collections.ArrayList, System.Collections.Queue and System.Collections.Stack respectively. Type accelerator names for Queue and Stack are same as class names.
73+
Using 'list' is proposed for System.Collections.ArrayList instead of 'ArrayList' for brevity, 'ArrayList' is too long.
7474

75+
76+
### Scope
77+
78+
Type accelerators for generic types for collections are out of scope for this RFC. They might be addressed in future RFCs.

0 commit comments

Comments
 (0)