John W Kennedy <
john.w....@gmail.com> wrote:
> On 1/27/23 4:33 PM, wat fiv wrote:
>> On Friday, January 27, 2023 at 9:46:53 AM UTC-5,
bearlyabus...@gmail.com wrote:
>>> Version 1.0.0 of the Iron Spring PL/I compiler is now available. The
>>> major feature of this release is support for self-defining structures,
>>> declared with the REFER option. It also includes other minor
>>> enhancements and bug fixes. Consult the documentation for more complete
>>> information.
>>>
>>>
http://www.iron-spring.com
>>
>> Congratulations on making version 1.0.0! And thank you for your work,
>> its a shame that IBM doesn't do this anymore.
>>
>> I've never understood the point of refer; can't one use just use HBOUND
>> (technically, HBOUND-LBOUND+1) or MAXLENGTH to find the size of an
>> object? Of course you included it to be compatible with IBM, but why is
>> it necessary to begin with? It looks like it might be a foot gun.
>
> Since the variable is BASED, it has no dope vector or descriptor
> associated with it. It has only the naked data contained within in the
> structure, so the REFER is necessary to make HBOUND and LBOUND work in
> the first place. Languages with substantial differences from PL/I (like,
> say, Swift) might find a way to work around that, but READ SET
> absolutely demands that the structure be entirely self-describing as it
> stands.
>