2 ms·
That's fine for doing algebra in pure functions, but what about destructive commands or interactive scenarios? For example, using "rm" on the command line, or
by Terr_ 1y ago
That's fine for doing algebra in pure functions, but what about destructive commands or interactive scenarios?
For example, using "rm" on the command line, or an SQL "delete". I would very much like those short programs to be invalid, until someone provides more detail about what should be destroyed in a way that is accident-resistant.
If I had my 'druthers, the left-to-right prefix of "delete from table" would be invalid, and it would require "where true" as a safety mechanism.
- Twey 1y agoThe solution suggested by the author, I assume, is `table.where(true).delete()` and `all_my_data.rm()`, which indeed has the property you describe.
- deleted 1y ago[deleted]