Open cstjean opened 5 years ago
I see what you are saying. I initially wrote 90% of a reply disagreeing.
It does still do well to considers the difference between a CircularBuffer
and a CircularDeque
.
But I think you are right.
Full is awkward though.
We really want a verb.
filltocapacity!
?
It is long but that isn't bad for a fairly rare op.
I'm still thinking about this.
I went to use a CircularBuffer
today
and this was the behavour I expected.
I guess it depends on if you are thinking of your buffer as something that will mostly be empty, or something that will mostly be full.
The definition of
fill!(::CircularBuffer, val)
is at odds with the Base definition
When I think of the English word "fill", the CircularBuffer definition makes more sense, but clearly it's too late to change Base, and it seems bad to have the same function with two different meanings. I propose that, by analogy with
isempty/empty!
, we could rename the abovefill!
definition tofull!
, to match withisfull
. @femtotrader