On Sun, 9 Feb 2020 15:16:13 -0500, Phil Smith III wrote: 
>
>On my list of "things to do when I finish the time machine": No ASCII/EBCDIC 
>divide; no null-terminated strings. And something else, I forget what right 
>now. I have time, I can always do it last week.
>
You've complained about null-terminated strings before.  Why?

o Buffer overflow integrity exposures?
  Those result from careless software design; sometimes hardware.
  The IBM 1620 paper tape reader read tape until a record separator.
  Overflowing buffer.  Wrapping memory,  Repeatedly.  PDP-8
  read just one frame per instruction.

o Performance of strlen(), strcat(), etc.?  Dinosaurs felt betrayed
  when MVS gained UNIX Services; even more so when zSeries
  provided hardware support for null-terminated strings.

o The hole in the character set, aggravated by LF-terminated records?
  Don't conflate "string" with "array of char".

o Inability to extract a substring in-place, without copying.  PostScript's
  "substring" type provides for this nicely.  PostScript avoids null-
  terminated strings.

(Select one or more.  Specify others ad lib.)

What would you use instead, not provoking colleagues to complain
of impractically small string size limits or wastefully large
descriptors?

Unit records sometimes bother me;  I'd like to be able to output
before I know the length of the line, as in the Poor Man's Progress
Bar:
    for I in a b c d e; do printf .; sleep 1; done; echo

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to