[STD-LIB] DString has a few confusing method names
The current DString implementation inside the standard library has the following methods:
fn void DString.append_chars(&self, String str);
fn void DString.append_string(&self, DString str);
Based on the name however, one would think that append_chars takes in a char[], and append_string takes in a String.
This is not the case currently; furthermore, a char[] cannot implicitly convert to a String.
The current situation is a bit confusing, and I would propose changing the names:
append_chars(String str)=>append_string(String str)append_string(DString str)=>append_dstring(DString str)
Maybe append_chars could stay and take in a char[] instead, but from Discord I gathered that might not be preferred due to String adhering to UTF8 and char[] not really, so mixing them might not be a good idea.
I made a branch myself with the above proposal, but the deprecation path is unclear, as there are overlapping names between the old and new proposed names: https://github.com/c3lang/c3c/compare/master...BWindey:c3c:dstring_append
For what it's worth, I think this is a good proposal
A clean and intuitive syntax is crucial for feeling joy when using a programming language, and therefore, also for adoption :)
New names: append_string, append_dstring, append_bytes. Using append_string for dstrings will work, but is deprecated. Try it out please
Ping
Thanks! Is perfect.