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

You mean like grep not returning anything when it searched for something and didn't find it?

It is more about a lack of feedback than a hidden state. It is a problem but not the same one. Talking about Unix tools, the hidden state would be more like environment variables like the PATH or locale.



Environmental variables are essentially dynamic binding at process level. Super useful, but I wish there was a way for programs to declare what env variables they're using, in a way that can be inspected programmatically.

Related: cmdline arguments are essentially lexical binding at process level. I wish there was an idiom there like there is in Lisps (Common Lisp in particular), where a function would take an optional argument whose default value is the value of a dynamic variable. In process terms, that would be declaratively specifying that an optional cmdline parameter takes its default from an environment variable.


Or just some kind of generic way to advertise where they're reading configuration. The worst are programs that search 20 places for configuration, so you have no idea whether you've turned some feature on or off.

What I really want is a generic system of algebraic effects for processes so "read configuration" becomes something I can inspect or wrap with my own handler.




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

Search: