long id

Oct. 1st, 2015 02:02 pm
juan_gandhi: (VP)
[personal profile] juan_gandhi
I think I got it where all this bs about passing around numerical ids of entities instead of entity references (maybe lazy) come from. It's like 'error code'. It comes from the ancient c programming, where we just could not allocate a string for a readable piece of text, or for the data that may need some efforts to instantiate or allocate.

In short. It's stupid to pass around "ids" in a program.

Date: 2015-10-04 09:17 pm (UTC)
From: [identity profile] 109.livejournal.com
с содроганием прочитал этот тред. особенно про преимущества int перед long.

> In short. It's stupid to pass around "ids" in a program.

не очень осмотрительно представлять свой очень специфический use case как "всегда" и "везде". это очевидный bias, но надо же себя заставлять.

вообще меня удивляет, как ты дожил до преклонных лет, а до сих пор не знаешь, что правильный ответ на любой вопрос - it depends.

например, я в основном работаю с данными, которые не влезают в память одной машины любого осмысленного размера. мысли создавать врапперы над числовыми id в такой обстановке даже зародиться неоткуда.
Edited Date: 2015-10-05 01:54 am (UTC)

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

June 2025

S M T W T F S
1 2345 6 7
8 9 10 11 121314
15161718 1920 21
222324252627 28
29 30     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 6th, 2025 07:07 am
Powered by Dreamwidth Studios