[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: help with naming convention
- From: "Patrick Mc(avery" <patrick@...>
- Date: Wed, 12 Oct 2011 21:29:04 -0400
I am planning on changing my business name for the 6th time. In a
project I did a while back, I used X as a separator and wrote code like
this, someXstupidXvar, I'm really bad at naming things!
In my next project I will be heavily using the Lua C API. I like their
naming conventions but I want my code to be easy to spot amongst theirs.
I figure that most non-trivial names have a commonly used part and one
or more uncommon parts.
I was thinking of truncating the common part at 3 or 4 characters and
capitalizing it, even if it did not sample the syllables of the full
name. So STA instead of STK for stack or ARR instead of ARY for array.
I was then thinking of separating with an underscore and then using
lowercase and a non-abbreviated name(s) for the less common parts.
so here are some fictitious examples
ARR_pop
ARR_rotate_left
STR_concatenate
STR_copy
NUM_to_hex
NUM_double
Does this sound logical? Any pitfalls I am setting myself up for? Is
this more of my naming insanity?
Thanks for reading-Patrick