-
Notifications
You must be signed in to change notification settings - Fork 53
Naming function arguments #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For function arguments and local vars, the convention seems to be to use |
|
But if the clarification (which predicate) is needed, the convention is to end the variable name with http://www.gnu.org/software/emacs/manual/html_node/elisp/Type-Predicates.html |
Well, a function argument isn't necessarily a predicate. |
👋 |
Dear emacs-lisp-style-guide,
I've always been afraid of naming things. Things began to go wrong when as a child I named my pet hamster C-x C-( # and all the kids in the school's vim user group made fun of me. A year later I named my pet chimpanze "grandma" and got no present for christmas! I had to steal some tinsel off the tree and take it to school pretending it was a new brand of "soft, linear slinky". It's just so difficult! The uncertainty and arbitrariness involved always make me feel like I've made the wrong choice and It has always been an endless source of mental anguish. That is why I am so glad to have a resource such as this, so that now when I make a bad choice I can simply point at someone else and claim "They made me do it!", just like that murder trial they put me through.
Ever since I began using your guide my life has been transformed. I now feel dynamic and vivacious, even vigorous. My wife tells me I've grown several inches, an unexpected delight at my ripe old age of 117! and I'm getting taller too!
One nagging issue I still have trouble with, which this admirable compandium of sound advice has provided no guidance on thus far, is the question of properly naming a function argument when writing a higher-order function. Should I use a suffix like
-func
or-f
? should I use a descriptive action name likescore-of
orcompare
? perhaps there is an even better way?Anxiously Awaiting your Advice,
Kind regards,
Trepidatious in Trinidad
The text was updated successfully, but these errors were encountered: