Makes sense. Thanks, Paul.
Francisco 2009/8/27 Paul Davis <[email protected]>: > On Wed, Aug 26, 2009 at 6:03 PM, francisco > treacy<[email protected]> wrote: >> Oh, ok. >> >> This means the cornerstone of my library is built upon a bug :) > > I wouldn't say that. There's nothing that keeps your library from > reserving a prefix for its internal use. You're free to use anything > like $ or # or even use a _ suffix. > >> Is there any way I can define such a key, in order to interfere as >> less as possible with library user's data? (i was thinking perhaps >> externals some way to define some "reserved" keys?) > > The only two approaches would be convention and nesting. If you want > to make sure you can store anything at all with the library, the only > real answer is to create an object like {"_id": "foo", "user_data": > ...} but just using another non-underscore prefix wouldn't be too far > out of the question. Granted you might want to see if anyone else has > nominated one for consistency across libraries. > > HTH, > Paul Davis >
