Which would you do:
setter(index, value)
or
setter(value, index)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would say the first. I normally put the high level argument first, i.e. the index decides where to place the value in.
From a computer’s perspective: first you need the location of where to store, when that is found, the value can be set.
It is similar as setting a property of e.g. an element of a car:
SetWheelDiameter(CarModel model, Part.Wheels, Wheel.Diameter, 19.0)
Parameters are from high level to low level.