Hi BT, BT Templeton <b...@hcoop.net> skribis:
> Andy Wingo <wi...@pobox.com> writes: [...] >> Here I disagree. From the perspective of semantics and security, it's >> important to be able to make assertions as to the type of value returned >> by a procedure -- that (current-input-port) returns a port. The same >> goes for (current-language) and all the other dynamic parameters. >> Parameters allow us to make guarantees like that. > > Why is it uniquely useful to be able to make these guarantees for > dynamically-bound values? Static/soft typing would be more generally > useful than parameters. I agree it’s not specific to dynamically-bound values. Andy mentioned that exporting, say, the fluid that underlies ‘current-output-port’ would be a problem because you could ‘fluid-set!’ it to anything, which would lead to an obscure wrong-type-arg error sometime. OTOH it could be argued that this is no different with mutable global variables. > Also, I'd prefer it if parameters used a type predicate or a type > specifier object instead of a conversion procedure. ISTM that the > current interface conflates type checking and coercion. Well, Andy’s proposal is similar to SRFI-39 and I find it convenient this way. Thanks, Ludo’.