Sds vs. GB: C string libs, copy or coincidence?

I was testing a bunch of different of C/C++ libraries to manage strings, and found this coincidence:

sds (Simple Dynamic Strings from antirez, Redis creator): https://github.com/antirez/sds/blob/master/README.md?plain=1#L33

gb (gb single file libs from gingerBill, Odin language creator): https://github.com/gingerBill/gb/blob/master/gb_string.h#L71

Copy or coincidence?

3 points | by nephewtom 1 day ago

4 comments

  • jqpabc123 1 day ago
    Object Pascal (Delphi, Free Pascal) offered this as a native part of the language over 2 decades ago.

    But of course, we all know that real programmers don't use Pascal and instead prefer to re-invent it with C syntax.

  • ecesena 1 day ago
    I'd say copy, but don't see any issue with that?

    Looking at the git blame, antirez wrote that 12y ago, gingerBill 9y ago. Licenses look both permissible.

  • nephewtom 1 day ago
    May be... inspiration...
  • pestatije 1 day ago
    thats whats called a "false dilemma"