Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Your understanding is inconsistent with the examples in vintermann's comment. Using a sequence number as an internal-only surrogate key (deliberately opaqued when sent outside the bounds of the database) is not the same as sticking gender identity, birth date, or any natural properties of a book into a broadly shared identifier.




No it's not, they very explicitly clarify in follow-up comments that unique identifiers should not be embedded any kind of meaningful content. See:

https://news.ycombinator.com/item?id=46276995

https://news.ycombinator.com/item?id=46273798


Okay, but they ignore the stuff I was talking about, consistent with my description of this as a straw man attack.

> A running number also carries data. Before you know it, someone's relying on the ordering or counting on there not being gaps - or counting the gaps to figure out something they shouldn't.

The opaquing prevents that.

They also describe this as a "premature optimization". That's half-right: it's an optimization. Having the data to support an optimization, and focusing on optimizing things that are hard to migrate later, is not premature.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: