jmlondon / pathroutr

R package for routing tracks around barrier polygons
https://jmlondon.github.io/pathroutr/
16 stars 2 forks source link

Adopt/Confirm 7 Principles of Scannable Function Specs #26

Open jmlondon opened 1 year ago

jmlondon commented 1 year ago

From the posit::conf 2023 'Package Development Masterclass' and tidy design principles for package development, the following 7 principles were presented:

  1. Make arguments explicit
  2. Put the most important arguments first
  3. Required arguments shouldn't have defaults
  4. Put ... after required arguments
  5. Keep defaults short and sweet
  6. Enumerate possible options
  7. Reduce clutter with an options object

1 thru 5 should be pretty straightforward to adopt; 6 & 7 will take some thought and effort.