libera/#sbcl - IRC Chatlog
Search
20:41:59
stassats`
i wanted to fold (if (> x 10) (print 10) (print 10)) to (print 10), but then > checks X for NUMBER
20:42:29
stassats`
which does happen if it's folded, but i wanted to delay until vop selection, which happens after typecheck generation
21:22:54
mrcom
Are you allowed to say "this standard function has no side-effects not documented in the standard".
21:31:26
mrcom
As a user, I'd be ok with you optimizing it out in high-optimization mode. If I'm concerned about the compiler letting something slide I'll manually check it anyway.
21:34:36
mrcom
Although I guess the chain of effects from a violated assumption can be ugly to debug.
21:40:23
mrcom
Another thought from the peanut gallery--it would actually be more useful to me to be told "you've got technically useless code here" than to do the defacto type checking.
21:42:52
mrcom
That and "I can't figure out if your function return actually matches the declaration"
21:49:10
mrcom
"complex type specifier too complicated"? maybe a different one Something about "to check" or words to that effect.
21:52:17
mrcom
Although it's almost always the set of possible return values, not the assertion, that's messed up. So maybe not that one either.
21:57:35
mrcom
Anyway, I almost always run speed 1 safety 3 and fix *any* notes, so skipping checks in higher optimzation settings is pretty safe. For me.
22:15:56
mrcom
On the other hand, if a customer told me "Don't bother checking this input. It takes too long." I'd be inclined to stare at them for a while, then tell them "No."