Re:Design for readability – A primer on code typography
by aetherspawn on Sunday December 10, 2017 @04:06PM
(#15893496)
I agree, I think the most relevant arguments should be first and dilute out to less relevant arguments (eg. it’ll probably still work if you pass null or zero).
Then you can typically collate your useless short arguments on one line and you don’t get wierd formatting at the call sites, right?
Re:Design for readability – A primer on code typography
by ameyakarve on Sunday December 10, 2017 @04:44PM
(#15893654)
It does make sense. I'll experiment with a combination of the two going forward (probably semantic first, lexicographical later)
Re:Design for readability – A primer on code typography
by seandougall on Sunday December 10, 2017 @06:00PM
(#15893962)
Among other issues, it breaks down completely as soon as you have subclasses of any sort.
This is weird. I've never encountered (or noticed) ordering parameters by their type names. Semantic ordering (subject, object, adverb, optionals) makes more sense to me - especially if you see type names only once at declaration, but have to guess/deduce parameters order at every call site.