getwilds / cancerprof

API Client for State Cancer Profiles
http://getwilds.org/cancerprof/
Other
2 stars 3 forks source link

Order of parameters #59

Closed sckott closed 6 months ago

sckott commented 7 months ago

Typically - at least what I'm familiar with - required parameters go first, with optional parameters (including those with default values) last.

e.g., in demo_crowding you have

function(area, areatype, 
                          crowding = "household with >1 person per room", 
                          race)

whereas i'd want crowding to go last

function(area, areatype, race,
                          crowding = "household with >1 person per room")

do other folks have other ideas?

howardbaik commented 7 months ago

100% agreed. See second/third principles of https://github.com/posit-conf-2023/pkg-dev-masterclass/blob/main/materials/1-api-design.pdf