Setting size to 0 was dangerous as it could lead to the bucket explosion problem. A good practice should be for users to have a rough idea how many buckets to expect and to specify a reasonable bound for it.
If you worry about imprecisions, have a look at this section: