In the very first message with this new subject line, Clem Clarke said "We know 
that C searches for a byte with a binary zero to find how long a string is." 
which is what I was responding to.

PL/X is good for many things. C is good for many things. So are Java, and 
Python and Go and Rust, etc. I'm fluent in many languages and none of them is 
right for every use. Heck, even REXX is great for quick API testing.

PL/X and C (and arguably assembler) are not the best at higher level interfaces 
mostly because they were not designed for that, but they excel at OS-level 
interfaces because they force the developer to think more concretely (in my 
experience). Java and Python, on the other hand, were clearly designed with a 
more abstract approach which leads to better UI.

To my original point, even if IBM had released it many years ago, I don't know 
if PL/X would be dominating.

Eric Rossman

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Peter Relson
Sent: Tuesday, October 3, 2023 8:12 AM
To: [email protected]
Subject: [EXTERNAL] Re: PL/X Open Source and PL/I - Helping to save the world 
and cut CPU Cycles and electricity

<snip>
PL/X, on the average, is not really better than C in terms of what you describe 
except when the string's length is known in advance (which is hard or 
impossible in many circumstances </snip>

I didn't see stated in any post on this topic the explicit mention of 
zero-delimited strings. That is what the discussion seems to be talking about. 
Not all "character areas" are zero-delimited. PL/X has no support for a 
zero-delimited string. When z/OS interfaces are used within C, there are rarely 
(if ever) zero-delimited strings. A C program could/would use MEMCPY to copy a 
string for which the length is known. And there are analogs of that for 
"compare". That makes it a less natural language construct within C than a 
zero-delimited string.

PL/X does have the concept of a variable-length string (with the length being 
in a separate variable, or in a preceding halfword).

Manipulation of a variable-length string is going to be very different than 
manipulation of a zero-delimited string.

Peter Relson
z/OS Core Technology Design


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

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

Reply via email to