On Friday 15 April 2005 10:44 am, Stefan Hundhammer wrote:
C's string handling for instance sucks - it is the source of most security holes that need to be fixed. Buffer overflows happen because C does not have a concept for variable length strings - it only has character pointers. What a nightmare. I disagree with your opinion. A C string is an array of characters. One must remember that C is NOT a high level language like FORTRAN or COBOL, it was designed as an implementation language. C++ implements a variable length string based on the C strings.
Some other languages use a tld type of string where the first byte of the
string contains a length. Languages like BASIC are more flexible because
their string handling is performed under the covers.
--
Jerry Feldman