[Schevo-devel] Why extent names instead of extent instances?
Matthew Scott
mscott at goldenspud.com
Fri Dec 9 10:16:56 EST 2005
On 12/9/05, Tom Locke <tom at livelogix.com> wrote:
> You wouldn't need that new namespace for that example would you, you'd
> just use db.PhoneNumber.name wouldn't you?
This is because the extent namespace isn't clean:
http://schevo.org/class-schevo.extent.Extent.html
Thus, the 'f' namespace
Side note - we deliberately made all namespaces single-letters (except
for 'sys', which arguably could be shortened to 's' now that I think
of it) so that we could attach them anywhere without cluttering their
parent namespace, and they only require two more keystrokes :)
By keeping the namespaces consistently named across all types of
parents, it's easy to form mnemonic associations between a small
handful of single letters and what each letter means.
> That's taking the idea a step further. I like it. Am I right that:
>
> >>> db.PhoneNumber.f.person is db.PhoneNumber.field_spec["person"]
> True
>
> ?
>
Correct. With the addition that the field class would be tagged with
its name and associated extent, since those would be needed.
--
Matthew R. Scott
More information about the Schevo-devel
mailing list