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

I understand, that's why I was asking about an additional api (get_xx_multi, etc) that would return an array or composite string or whatever, while get_xx would continue to return just the single/latest value.

Not being able to tell whether or not foo was specified twice or foo and foo_1 were specified separately just gives me flashbacks to a bygone era of osdev and gives me security creepy-crawlies.

(also how do you handle `device=xxx device=yyy device_1=zzz`?)



If there's other users for this I'll write a getenv_multi which takes a callback function. Didn't seem like much point doing that until we want to use this somewhere else though.

We end up with device=xxx and device_1=yyy but if you mean that someone specifies device_1=zzz after that, it would show up as device_1_1=zzz. I'm inclined to file that one under "if a user is deliberately obtuse, they get what they deserve".


> We end up with device=xxx and device_1=yyy but if you mean ...

No, I meant the first example. I'm trying to think of realistic non-obtuse cases like an entirely different spec calls for name_1, name_2, etc. but for some reason a numbered key is repeated. It's mostly an academic concern though, no worries!

Thanks for the awesome work you do for the FreeBSD community, as always.




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

Search: