Hi list, After reading the Outline document, I find myself wondering if there's a way to provide a type without any method for the user to manually create an inhabitant of that type ?
This is a technique commonly used in functional programming (and sometimes used in Java/C#, too, I believe) to provide type-checked safety / security, e.g. you can only call function "read_from_file" with an argument of type "FileOpenedForReading", which itself may only be obtained from function "open_file" and cannot be forged. Of course, this example applies to files, but could just as well apply to any kind of credential. From the Outline, operator "as" and reflexivity make me think it's not possible. Am I wrong ? Cheers, David -- David Teller ------------------------------------------ Security of Distributed Systems ----------------------- Project JStify: Static Analysis for JavaScript 2 ----- -- http://www.univ-orleans.fr/lifo/Members/David.Teller ----- Laboratoire d'Informatique Fondamentale d'Orleans _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
