You could also handle your SV-table defaults with some metatable magic. That's the way I normally do it:
Code:
local defaults = {
enemy = true,
friend = true,
}
function CNames:ADDON_LOADED(event)
CNames_Options = CNames_Options or {}
setmetatable(CNames_Options, { __index = defaults})
...
end
The metatable's __index works as following: if some value in your table is 'nil', it automatically provides the value in the default table. So, you would handle it exactly the same currently, but won't have to think lots about booleans when defining new default values