Re: [hackers] [lchat] use libgrapheme instead of libutf || Jan Klemkow
On Mon, 3 Oct 2022 00:27:33 +0200
Jan Klemkow <j.klemkow_AT_wemelug.de> wrote:
Dear Jan,
> This task was on my list for some time. I were just to lazy to do it,
> till now :)
haha I see!
> I don't worry about an API change. But, why do make the function
> names so long? And why do you extend with "_utf8"? Function names
> in C are much shorter in general. For instance, grph_nxt_char_brk()
> would be more handy to use.
Readability is my highest priority, given code is written only once but
ideally read multiple times and thus, in my opinion, arguments in favour
of time-savings for typing are weak when they make it necessary for the
reader to look up a function given the function name is not explicit
enough to convey its purpose.
Given C has no namespaces, being strict with the prefix "grapheme" to
match the header name is canonical to me. "nxt" and "brk" do work but
don't save too much, but using "char" is definitely confusing, as it is
a logical throwback to the horribly misnamed char type in C, which is
already so difficult to separate from "codepoints" and "grapheme
clusters" (i.e. visible characters) in the lingo.
With best regards
Laslo
Received on Mon Oct 03 2022 - 23:42:27 CEST
This archive was generated by hypermail 2.3.0
: Mon Oct 03 2022 - 23:48:36 CEST