@@ -18,7 +18,6 @@ The bstring library has significant advantages over CString:
1818
1919 Thus it is compatible with more programming environments and available to
2020 a wider population of programmers.
21-
22212 . The internal structure of a bstring is considered exposed
2322
2423 A single contiguous block of data can be cut into read-only pieces by
@@ -28,12 +27,10 @@ The bstring library has significant advantages over CString:
2827 In this way, using bstrings in a totally abstracted way becomes a choice
2928 rather than an imposition. Further this choice can be made differently
3029 at different layers of applications that use it.
31-
32303 . Static declaration support precludes the need for constructor invocation
3331
3432 Allows for static declarations of constant strings that has no additional
3533 constructor overhead.
36-
37344 . Bstrlib is not attached to another library
3835
3936 Bstrlib is designed to be easily plugged into any other library collection,
@@ -88,18 +85,13 @@ Comparison With C++'s `std::string`
8885This is the C++ language's STL based string class.
8986
90871 . There is no C implementation.
91-
92882 . The ` [] ` operator is not bounds checked.
93-
94893 . Missing a lot of useful functions like ` printf ` -like formatting.
95-
96904 . Some sub-standard ` std::string ` implementations (SGI) are necessarily
9791 unsafe to use with multithreading.
98-
99925 . Limited by STL's std::iostream which in turn is limited by ifstream which
10093 can only take input from files. (Compare to CBStream's API which can take
10194 abstracted input.)
102-
103956 . Extremely uneven performance across implementations.
10496
10597Comparison With ISO C TR 24731 Proposal
@@ -123,13 +115,9 @@ few non-reenterable functions (`asctime`, `ctime`, and `strtok`).
123115
1241161 . Still based solely on ` char * ` buffers (and therefore ` strlen ` and ` strcat `
125117 is still O(n), and there are no faster ` streq ` comparison functions.)
126-
1271182 . No growable string semantics.
128-
1291193 . Requires manual buffer length synchronization in the source code.
130-
1311204 . No attempt to enhance functionality of the C library.
132-
1331215 . Introduces a new error scenario (strings exceeding ` RSIZE_MAX ` length).
134122
135123The hope is that by exposing the buffer length requirements there will be
@@ -294,23 +282,19 @@ This library is [available online](http://www.annexia.org/freeware/c2lib).
294282 Their suggestion that alternatives which wrap the string data type (such as
295283 bstring does) imposes a difficulty in interoperating with the C langauge's
296284 ordinary C string library is not founded.
297-
2982852 . Introduction of memory (and vector?) abstractions imposes a learning
299286 curve, and some kind of memory usage policy that is outside of the strings
300287 themselves (and therefore must be maintained by the developer.)
301-
3022883 . The API is massive, and filled with all sorts of trivial (` pjoin ` ) and
303289 controvertial (` pmatch ` -- regular expression are not sufficiently
304290 standardized, and there is a very large difference in performance between
305291 compiled and non-compiled, REs) functions. Bstrlib takes a decidely
306292 minimal approach -- none of the functionality in c2lib is difficult or
307293 challenging to implement on top of Bstrlib (except the regex stuff, which
308294 is going to be difficult, and controvertial no matter what.)
309-
3102954 . Understanding why c2lib is the way it is pretty much requires a working
311296 knowledge of Perl. bstrlib requires only knowledge of the C string library
312297 while providing just a very select few worthwhile extras.
313-
3142985 . It is attached to a lot of cruft like a matrix math library (that doesn't
315299 include any functions for getting the determinant, eigenvectors,
316300 eigenvalues, the matrix inverse, test for singularity, test for
@@ -330,9 +314,7 @@ Comparison With stralloc/qmail
330314More information about this library can be [ found] ( http://www.canonical.org/~kragen/stralloc.html ) [ online] ( http://cr.yp.to/lib/stralloc.html ) .
331315
3323161 . Library is very very minimal. A little too minimal.
333-
3343172 . Untargetted source parameters are not declared const.
335-
3363183 . Slightly different expected emphasis (like ` _cats ` function which takes an
337319 ordinary C string char buffer as a parameter). It's clear that the
338320 remainder of the C string library is still required to perform more
@@ -357,13 +339,11 @@ wxString Class
357339This is the string class used in the [ wxWindows project] ( http://www.wxwindows.org/manuals/2.4.2/wx368.htm#wxstring ) .
358340
3593411 . There is no C implementation.
360-
3613422 . The memory management strategy is to allocate a bounded fixed amount of
362343 additional space on each resize, meaning that it does not have the
363344 ` log2(n) ` property that Bstrlib has (it will thrash very easily, cause
364345 massive fragmentation in common heap implementations, and can easily be a
365346 common source of performance problems).
366-
3673473 . The library uses a "copy on write" strategy, meaning that it has to deal
368348 with multithreading problems.
369349
@@ -375,12 +355,9 @@ networking/realtime programming. It can be found [online](http://www.and.org/vst
375355
3763561 . The convoluted internal structure does not contain a ` '\0' ` ` char * `
377357 compatible buffer, so interoperability with the C library a non-starter.
378-
3793582 . The API and implementation is very large (owing to its orthogonality) and
380359 can lead to difficulty in understanding its exact functionality.
381-
3823603 . An obvious dependency on gnu tools (confusing make configure step)
383-
3843614 . Uses a reference counting system, meaning that it is not likely to be
385362 thread safe.
386363
@@ -427,7 +404,6 @@ MFC and STL. The architecture, similarly to MFC's CStrings, is a copy on write
427404reference counting mechanism.
428405
4294061 . Commercial
430-
4314072 . C++ only
432408
433409This library, like Vstr, uses a reference counting system. There is only so
@@ -511,9 +487,7 @@ functions.
511487
5124881 . Uses standard ` char * ` buffer, and adopts C 99's usage of ` restrict ` to
513489 pass the responsibility to guard against aliasing to the programmer.
514-
5154902 . Adds no safety or memory management whatsoever.
516-
5174913 . Most of the supplied string functions are completely trivial.
518492
519493The goals of libclc and Bstrlib are clearly quite different.
@@ -525,7 +499,6 @@ More information is [available online](http://firestuff.org/).
525499
5265001 . Uses standard ` char * ` buffer, and adopts C 99's usage of ` restrict ` to
527501 pass the responsibility to guard against aliasing to the programmer.
528-
5295022 . Mixes ` char * ` and length wrapped buffers (estr) functions, doubling the
530503 API size, with safety limited to only half of the functions.
531504
@@ -542,13 +515,10 @@ of increasing safety and power to C's string handling capabilities.
542515
5435161 . While the ` safestr_* ` functions are safe in of themselves, interoperating
544517 with ` char * ` string has dangerous unsafe modes of operation.
545-
5465182 . The architecture of safestr's causes the base pointer to change. Thus,
547519 its not practical/safe to store a safestr in multiple locations if any
548520 single instance can be manipulated.
549-
5505213 . Dependent on an additional error handling library.
551-
5525224 . Uses reference counting, meaning that it is either not thread safe or
553523 slow and not portable.
554524
@@ -584,6 +554,3 @@ essence, would allow the compiler to enforce trust propogation at compile
584554time rather than run time. Non-resizability is also interesting, however,
585555it seems marginal, i.e., to want a string that cannot be resized, yet can be
586556modified and yet where a fixed sized buffer is undesirable.
587-
588- <!-- vim: et:sw=4:ts=4
589- -->
0 commit comments