Skip to content

Commit eab5e1f

Browse files
committed
RFC #66: Use short argument names.
1 parent 6f287a1 commit eab5e1f

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

text/0066-simulation-time.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ A new type `Period` is introduced.
2525
It is immutable and has a constructor accepting at most one named argument, giving the following valid forms of construction:
2626
- `Period()`
2727
- Constructs a zero period.
28-
- `Period(seconds: numbers.Real)`
29-
- `Period(milliseconds: numbers.Real)`
30-
- `Period(microseconds: numbers.Real)`
31-
- `Period(nanoseconds: numbers.Real)`
32-
- `Period(picoseconds: numbers.Real)`
33-
- `Period(femtoseconds: numbers.Real)`
28+
- `Period(s: numbers.Real)`
29+
- `Period(ms: numbers.Real)`
30+
- `Period(us: numbers.Real)`
31+
- `Period(ns: numbers.Real)`
32+
- `Period(ps: numbers.Real)`
33+
- `Period(fs: numbers.Real)`
3434
- The argument will be scaled according to its SI prefix and used to calculate the closest integer femtosecond representation.
35-
- `Period(hertz: numbers.Real)`
36-
- `Period(kilohertz: numbers.Real)`
37-
- `Period(megahertz: numbers.Real)`
38-
- `Period(gigahertz: numbers.Real)`
35+
- `Period(Hz: numbers.Real)`
36+
- `Period(kHz: numbers.Real)`
37+
- `Period(MHz: numbers.Real)`
38+
- `Period(GHz: numbers.Real)`
3939
- The argument will be scaled according to its SI prefix and its reciprocal used to calculate the closest integer femtosecond representation.
4040
A value of zero will raise `ZeroDivisionError`.
4141

@@ -136,13 +136,8 @@ None.
136136

137137
- With the scope of `Period` extended beyond simulation, where do we put it?
138138

139-
- Should we use shorter argument/property names like `MHz` instead of (or an alias in addition to) `megahertz`?
140-
141139
- Should we disallow passing a negative frequency or accessing a frequency property on a negative period?
142140

143-
- We could allow passing multiple constructor arguments and add them together -- should we?
144-
- Probably not. Limited usefulness for durations and nonsensical for frequencies.
145-
146141
## Future possibilities
147142
[future-possibilities]: #future-possibilities
148143

0 commit comments

Comments
 (0)