Closed sttaft closed 9 months ago
Clear probably was removed as a call to any Get has the same effect (one just has to discard the result).
But then I see a more significant problem: nothing ever defines the initial state of a text buffer as empty. I think originally we had a Default_Initial_Condition that the Character_Count = 0, but of course that disappeared along with the function.
We either need to add back an Is_Empty function and an associated Default_Initial_Condition, or just add a sentence saying the initial state of a text buffer is empty. As it stands, a text buffer could start in any state -- it could contain the name of one's favorite ARG member if you call Get immediately after initialization!!
AI22-0087-1 was constructed for this issue.
AI22-0087-1 was apporoved at ARG meeting #63B, so this issue has been closed.
AI12-0341-1 had Character_Count and Clear operations on Ada.Strings.Text_Buffers. AI12-0384-2 dropped both of these. However, Character_Count is still mentioned in AARM A.4.12 (31/5, 31.a/5), so that is a clear wording bug.
It actually might be nice to have an AARM note explaining why such operations are not provided. AI12-0384-2 has an explanation for why Character_Count was dropped, but makes no mention of why Clear was dropped, and it still might be useful.