2 ms·
You can absolutely express tainting via the type system. I have seen this done before in Rust code in order to express functions that can only accept strings th
by kibwen 12y ago
You can absolutely express tainting via the type system. I have seen this done before in Rust code in order to express functions that can only accept strings that have been properly sanitized, along with a function that takes an unsanitized string and returns a sanitized one. This particular example was using phantom types, though you could obviously also define wholly separate types for this sort of thing.