On Tue, Oct 18, 2005 at 21:43:57 +0200, Juerd wrote: > > That was just a naive example - the words "Unsafe" and "Safe" are > > user defined, and are chosen on a case by case basis in their app. > > I think there's a lot to be gained by implementing something like this > globally, consistently. CPAN is part of Perl, as far as I'm concerned.
While I agree that there is something to be gained from semi-standard roles that allow modules to share compatible interfaces (for example, imagine that Storable, Data::Dumper both do the Serializable role, which is an interface spec jointly maintained by their authors), I think that the power of the paradgim I proposed is actually in non-shared code - things that apply to your app, and are hard to reuse except for similar deployments. The reason for my opinion is while an HTML sanitizer knows that it takes any arbitrary string, and returns a string that has no dangerous tags, and will not mess with the structure of the document, it doesn't know what is the origin or your data, or what is the destination of it's output. This amendment to the type system is supposed to help you make sure your glue code is glueing the right parts together, and while components are generally reusable, composed components are scarcely so. > > I don't see how this relates to the OP, or why encoding functions > > should implement it like this. > > The "should" is not to be taken literally, and applies only to the > described hypothetical universe. Huh? -- () Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker & /\ kung foo master: /me does a karate-chop-flip: neeyah!!!!!!!!!!!!!!
pgpuszFpyrQij.pgp
Description: PGP signature