IRC channel logs
2022-11-12.log
back to list of logs
<gnucode>(lambda (x) (if (string? x) #t (throw 'bad! x))) <gnucode>My gut tells me no. that predicates should not be able to raise exceptions... <old>By definition I think that a predicate either return #t or #f <lilyp>gnucode: it's a predicate as long as you wrap it in false-if-exception :P <gnucode>it's actually kind of funny because then file-exists? is not a predicate. <gnucode>I'll add that to me tiny hacks that I eventually need to do. <mwette>I think it's OK to raise an exception if input arguments are not consistent with the definition of the preditate. <old>file-exists? expect number (file descriptor) or path or port I think <old>So it makes sens for it to throw an exception I guess?