[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Re: RFC: Fake IDs
From: |
Nathaniel Smith |
Subject: |
Re: [Monotone-devel] Re: RFC: Fake IDs |
Date: |
Mon, 24 Jul 2006 02:26:51 -0700 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
Since you haven't responded to this yet, I'll just assume for now that
the single global counter solution is a minimal, implemented,
incremental improvement over what we have now, and we can consider the
fake_rid_source approach as a possible second, further improvement.
On Wed, Jul 19, 2006 at 12:53:09AM -0700, Nathaniel Smith wrote:
> > I propose an Explicit and Sound Mechanism:
> >
> > Make a class fake_rid_source that wraps a u64 counter and sequentially
> > assigns "%40.40llX" rids. Construct one and have it hand out fake rids
> > within the scope that you're using them. That makes the scope
> > relationships of your fakes somewhat explicit (which is half of what I
> > wanted with "checking the database") and still lets you generate a few
> > within a function and throw them out without dragging a db handle into it.
>
> Hmm. I guess as compared to the single global counter of Zack's
> patch (IIUC), this has an advantage:
> -- you must explicitly mark the scope of these rids in your code
> and a disadvantage:
> -- there's nothing to enforce you did this right, except careful
> code auditing[1]; in particular you might accidentally let two
> fake rids from two different sources bump into each other
> accidentally
> My knee-jerk reaction is that the advantage is only really an
> advantage if there's enforcement, but I dunno.
-- Nathaniel
--
"...these, like all words, have single, decontextualized meanings: everyone
knows what each of these words means, everyone knows what constitutes an
instance of each of their referents. Language is fixed. Meaning is
certain. Santa Claus comes down the chimney at midnight on December 24."
-- The Language War, Robin Lakoff
- Re: [Monotone-devel] Re: RFC: Fake IDs, (continued)
- Re: [Monotone-devel] Re: RFC: Fake IDs, Jack Lloyd, 2006/07/19
- [Monotone-devel] Re: RFC: Fake IDs, Graydon Hoare, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Zack Weinberg, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Nathaniel Smith, 2006/07/19
- [Monotone-devel] Re: RFC: Fake IDs, Graydon Hoare, 2006/07/19
- Re: [Monotone-devel] Re: RFC: Fake IDs, Nathaniel Smith, 2006/07/19
- Re: [Monotone-devel] Re: RFC: Fake IDs,
Nathaniel Smith <=
Re: [Monotone-devel] RFC: Fake IDs, Florian Weimer, 2006/07/19