Better HN
topnewbestaskshowjobs
Log inSign up

edsko

4 karma · joined Dec 1, 2012 (13y ago) · 2 submissions

Submissions

comment 1y ago · link · parent

(Author of falsify here.) You are absolutely correct that the empty string isn't always the best counter-example. The goal of shrinking is to shrink to the _simplest_ possible value (this is true for all approaches to shrinking). What constitutes "simple" is very much domain specific. It would certainly be possible to write a generator that would shrink to, say, "foo", as the canonical "simplest" example of a simple string. Indeed, since we are working in a lazy language, you could (with a bit of effort) shrink to `undefined` if the other arguments are not used at all.

comment 13y ago · link · parent

Wow, thanks! John and I spent a long time thinking about it :)