Closed Daniel1464 closed 2 weeks ago
Btw am working on c++ implementation soon; just kinda busy this week
/format
This should not be done, if you want to reduce allocations keep them stored as members internally.
Having access be a method is more flexible allowing for extra arguments, there really isn't a benefit to doing it like this besides removing the parent which isn't worth it for giving up coherency with the rest of the API.
This restricts us in terms of future API changes so we won't do it but if you'd like to make these functions singletons that would be accepted
Having access be a method is more flexible allowing for extra arguments, there really isn't a benefit to doing it like this besides removing the parent which isn't worth it for giving up coherency with the rest of the API.
I dont think this stops us from adding a done()/active() method that takes in arguments.
Having no-args methods be replaced by properties is also pretty consistent as well. In general, I think that if we don't need something to be a method it should not be a method, and it should be properly represented as what it is.
Having access be a method is more flexible allowing for extra arguments, there really isn't a benefit to doing it like this besides removing the parent which isn't worth it for giving up coherency with the rest of the API.
I dont think this stops us from adding a done()/active() method that takes in arguments.
Having no-args methods be replaced by properties is also pretty consistent as well. In general, I think that if we don't need something to be a method it should not be a method, and it should be properly represented as what it is.
The issue with this is it makes it very hard to change the implementation of these Triggers without breaking the API. With a method this is reduced.
The issue with this is it makes it very hard to change the implementation of these Triggers without breaking the API. With a method this is reduced.
ok honestly u guys prob have more foresight than me on this, so i'll trust your intuition.
Resolves https://github.com/SleipnirGroup/Choreo/issues/897
Since these triggers are used so often, they can help significantly reduce clutter in the code. Before:
Now:
This also reduces the number of allocations.