in reply to Re: Generate unique ids of maximum length
in thread Generate unique ids of maximum length

Why a random string and not simply a sequence number?  The latter would have the advantage of definitely being unique (besides being trivial to implement), while a random string might (in theory) repeat, and thus not necessarily be "totally unique"... (which means you'd need to check against a hash holding already used IDs).  Also, for the reverse lookup a simple array would suffice.

  • Comment on Re^2: Generate unique ids of maximum length

Replies are listed 'Best First'.
Re^3: Generate unique ids of maximum length
by BioLion (Curate) on Apr 12, 2010 at 19:15 UTC

    Good points - especially the array part - I was just thinking about the 'strings of the same length' part. Either way, the point is the same.

    Just a something something...