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

It seems they are arguing that setenv should not exist in the first place: the fact it exists suggests it can and should be used, and thus not be a footgun.


> can and should be used, and thus not be a footgun

It can and should be used in the cases where it makes sense, with the restrictions that are documented. It's an API that is fundamentally not thread-safe, you can not use it "safely" (in the modern sense of using it after a lobotomy, in any way that the compiler allows) in a multi-threaded context.

There are other such APIs, and if those APIs were removed it would hurt a lot of old software that is running perfectly fine.


> the fact it exists suggests it can and should be used

I think most people argue about that. Just because it exists doesn't mean it should be used imho.

I've used it exactly once, and that was a school exercise where I had to write a Posix shell (most of a posix shell actually), including built-ins. I do not see another use case tbh.




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

Search: