Yes, that is one of the worst design flaws that I have seen in any language. It also violates a basic design principle: never imbed implementation details in the language.
PL/I had it right: you specify CHAR VARYING and don't worry about how the length is stored. PL/I F stores it in a string dope vector and everything since then stores it in a length field, but that is transparent to the programmer. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Discussion List on behalf of Clement Clarke Sent: Monday, April 28, 2025 6:48 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: What has IBM ever done for us? (probably more than I know) External Message: Use Caution Phil, my big bugbear is null terminated strings. Although there is little or no difference in searching for nulls or LFs and CRs! IBM certainly got it right with PL/I strings, with the length of the string up the front. Test after test I have done shows that null terminated strings are a minimum of 3 times slower than doing it "properly". And VB record formats, of course. Just think of the speed lost and high electricity costs throwing all the emails around the world every day! I actually spoke to Bill Gates about this decades ago, Notes etc are here: https://secure-web.cisco.com/17I9dKI1iibV7qIOclWwIuqp6pulXHcIkgoluFhJIDVEQ-yR8xvum5rdKJIfmNT7d2PKO8TcVNC27mOir-hwXx8JxSBLEU4rIQd6bK8v86W9ii6iz55HmUwjfGSaIxb108rtseOT1jidCI2le3Q0PqCKuc2dl_chKu_8gu0DiAbZ0E_0B5K7swBtM5IfX2B9I0eg_AEKRGUWT87uHPCDldyXJuZjpzIk8iaIDE6r_yBeapiErvFHQOCyIz87mE5ZrdDGqE4faLUybiHCxNQePVBnHLQyfVz7948uWZAxcG4XGCRB6L3DtSR36hRKUVLCE8e1S6cpyCy9LGhMCzvHzZcjAEa3Sez1OYWwyuU35JtzYA7yF61myhdnisslVsnuUw9Kl3ZXl3fKHGvnp91eccwAxySPIvFIQvyBIJVNitCg/https%3A%2F%2Fstart.oscar-jol.com%2Ffast-safe-c-strings =================== I think there may be a way to make shuffling emails etc around the net a bit better. Windows has various file types, such as .EXE, .JPEG, MP4 etc. Why not a file type of .VB? When the C Open routines see a filetype of VB, it could start buffering strings just like ZOS does and creating blocks. The GETS functions would not scan looking for CR, LF or nulls, but simply transfer the record the the address in the GETS function. And transferring data around the net would simply pick up the blocksize, and transfer the block. Such a scheme would help get data around the internet more quickly. Cheers, Clem Clarke On Fri, Apr 25, 2025 at 11:40 PM Phil Smith III <li...@akphs.com> wrote: > Luhn checksums. > > Barcodes weren't actually IBM: https://en.wikipedia.org/wiki/Barcode -- > though the UPC version was. But as a refinement, I'm not sure that counts. > > I think long-term compatibility should probably top the list. I have my > "Time-machine List" of things in computing that were done wrong and that > I'll fix when the machine works: > - ASCII/EBCDIC (arguably this one is IBM's fault with the "ASCII bit" in > S/360 and all that) > - null-terminated strings > - linends > > I'd add "more effort at maintaining compatibility across versions of > things" but that's probably too broad. Or maybe not; there will be time, I > can always do it last week. > > -----Original Message----- > From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf > Of Bodra - Pessoal > Sent: Friday, April 25, 2025 9:21 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: RES: What has IBM ever done for us? (probably more than I know) > > Bar Code was another IBM innovation. > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN