Skip to content

Commit db0cffb

Browse files
committed
Miscellaneous improvements to wording.
1 parent 2e573a9 commit db0cffb

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

doc/decisions/dr-004.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The following variants of this option, specifies different methods to cope with
9191

9292
#### Option 2a)
9393

94-
Instead of directly using a modified Arduino interface (for example for a specific `class`), we use an adapter.
94+
Instead of directly using a modified Arduino interface provided by the extensions (for example for a specific `class`), we use an adapter.
9595
The adapters would be integrated just as for option 1.
9696
But compared to option 1 this only needs to be done for those smallest indivisible interfaces which are not compatible to the vanilla ACA.
9797

@@ -113,8 +113,8 @@ Assuming that we do define interfaces for one or several HALs, we should not fol
113113
Because that would possibly complicate to write adapters for different HAL implementations.
114114
And allowing variants is one of the purposes of the adapters.
115115

116-
Instead we would design the interfaces such that they fit the usage.
117-
In general an object oriented approach is sensible to represent the different components which are available through HALs.
116+
Instead we should design the interfaces such that they fit the usage.
117+
In general an object oriented approach is sensible to represent the different peripheral components which are available through HALs.
118118
Also an object oriented approach is the most straightforward to implement dependency inversion.
119119

120120
This from those variants, **option 1a)** would be the best.
@@ -129,10 +129,10 @@ This from those variants, **option 1a)** would be the best.
129129
- Using a different implementation of our - to be defined - HAL interface would not require to modify the users of our HAL interface.
130130
Instead only a different adapter - implementing our HAL interface - would be required.[¹](<\ref dr004_1 "¹")
131131
- Cons:
132-
- This approach requires to write adapters for all HAL interfaces to 3rd party libraries.
133-
This is difficult and may result in boilerplate code.
134-
Note, that this would mean to write adapters to a HAL implementation, which is an adapter (to proprietary peripheral drivers) in itself.
135-
- **Option 2a)**: Use adapters for extensions to vanilla ACA
132+
- This approach requires to write adapters for all used HAL interfaces to 3rd party libraries.
133+
A reusable interface is difficult to design and the adapters may result in boilerplate code.
134+
Note, that this approach would mean to write adapters to a HAL implementation, which is an adapter (to proprietary peripheral drivers) in itself.
135+
- **Option 2a)**: Use adapters only for extensions to vanilla ACA
136136
- Pros:
137137
- Compared to option 1a), only a fraction of the adapters would need to be written.
138138
- Cons:
@@ -154,9 +154,9 @@ This from those variants, **option 1a)** would be the best.
154154
- In general conditionally compiled sections of code reduces its readability.
155155

156156
\note \anchor dr004_1
157-
¹: Although, *in practice* our HAL interface may not be suitable to accommodate the new HAL implementation (see [Rule of Three](https://en.wikipedia.org/w/index.php%3Ftitle%3DRule_of_three_%28computer_programming%29%26oldid%3D1173684754)).
157+
¹: *In practice* our HAL interface may not be suitable to accommodate the new HAL implementation (see [Rule of Three](https://en.wikipedia.org/w/index.php%3Ftitle%3DRule_of_three_%28computer_programming%29%26oldid%3D1173684754)).
158158
Thus we would have to adjust our HAL interface and the code using it accordingly.
159-
In other words: It is difficult to design an HAL interface such that we would actually benefit when changing the HAL implementation to a different 3rd party library. Thus this advantage may not be relevant for that case.
159+
In other words: It is difficult to design a HAL interface such that we would actually benefit when changing the HAL implementation to a different 3rd party library. Thus this advantage may not be relevant for that case.
160160
Also - in case the HAL implementation is changed - it may be less effort to adjust all the uses of the new HAL interface than to write adapters for the changed 3rd party library.
161161

162162
\note \anchor dr004_2
@@ -173,7 +173,7 @@ After careful consideration, we've decided on:
173173
174174
And more specifically for testing on native environments, use:
175175

176-
> **Option 2b):** Where the ACA is used it is allowed to add small conditionally compiled sections for tests in order to cope with deviations of the ACA used in productive code from the vanilla ACA.
176+
> **Option 2b):** Where the ACA is used, it is allowed to add small conditionally compiled sections for tests in order to cope with deviations of the ACA used in productive code from the vanilla ACA.
177177
178178
The latter relaxation is in order to facilitate the use of ArduinoFake to stub the HAL's interface.
179179

0 commit comments

Comments
 (0)