> Tom Marchant wrote:
> Well, ok, null-terminated strings are a booby-trap 
> included in the C language. But it was poor programming that caused the 
> problems.

I'm not sure how strings could be attributed to poor programming. Unix & C were 
designed and implemented around RISC processors. Instructions are limited to 
dealing with a single byte. In this situation, strings are far more optimal 
compared to fix length fields. IBM hardware changed that by implementing 
instructions like CLC and MVC.

Do you consider Unix file management poor programming? It has multiple types of 
read  (byte, halfword, fullword, string, specific length). Would you tell a C 
programmer they are poor programming because they don't always read a structure 
(similar to record). While I don't like it, I accept that it's not a common 
practice in C.

Regards, Jon. 

Reply via email to