Design for readability – A primer on code typography
1–8 of 8 posts
Re: Design for readability – A primer on code typography
#2This 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.
Re: Design for readability – A primer on code typography
#3> Lexicographical sorting by class-name to make things easier to find 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.
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
#4> Lexicographical sorting by class-name to make things easier to find 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.
Re: Design for readability – A primer on code typography
#5Re: Design for readability – A primer on code typography
#6> Lexicographical sorting by class-name to make things easier to find 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.
Re: Design for readability – A primer on code typography
#7> Lexicographical sorting by class-name to make things easier to find 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.
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
#8I really like the look of that right-aligned thing and I wonder if it works in practise. Any way to get Emacs to do that for me?