Ada-Rapporteur-Group / User-Community-Input

Ada User Community Input Working Group - Github Mirror Prototype
26 stars 1 forks source link

String_Access in unbounded string handling? #79

Open Blady-Com opened 6 months ago

Blady-Com commented 6 months ago

String_Access is defined in A.4.5 Unbounded-Length String Handling: 7 type String_Access is access all String;

and note: 75 The type String_Access provides a (nonprivate) access type for explicit processing of unbounded-length strings.

After some discussions on CLA, it appears yet useless. I even find it confusing, I suggest deleting it

sttaft commented 6 months ago

It would be too disruptive to simply delete it. It could conceivably be moved to a new package, though it is not obvious where would make any more sense.

ARG-Editor commented 6 months ago

I did a quick check of the AIs and found none that explicitly covered this issue.

However, it came up in e-mail in AI95-00230 (in 2000!) and was quickly squashed for the reasons previously given.

It came up in passing in the mail of several other AIs (AI-00301, AI05-0138-1, and AI05-206-1 among them). It seems given in those discussions that most think it would be too incompatible to eliminate it.

             Randy.
ARG-Editor commented 6 months ago

I think moving it would be equally disruptive (since one would need to change the context clause/references), and it is trivial to write yourself. Put it into your project-wide type package if you need a global one.

I'm dubious, however, that many people ever used this type. Certainly, in the handful of cases where I needed such a type, I never thought of Ada.Strings.Unbounded as being a place to find such a type already defined. It is such an odd place I doubt anyone outside of perhaps the people who defined the type ever used it. Moreover, it often it is better to define it yourself, generally you don't want to make it easy to use it outside of its domain. (Strong typing, you know?? :-)

OTOH, I agree that the compatibility impact is non-zero (anyone who did use it would have to change their code), and the benefit of removing the type at this point is close to zero (certainly there is a lot of unused stuff in any particular reusable package and any particular use of that package, so what's one more thing), so the cost-benefit ratio doesn't seem to make a change here worth it. An Ada successor language would design Ada.Strings.Unbounded rather differently (so as to be able to use string literals directly with the type) and probably would include universal character support as well, so it's hard to find any important reason to make a change.

Also, I'm pretty sure we're discussed this within the ARG several times in the past, so this is well-trodden ground.

              Randy.

From: S. Tucker Taft @.*** Sent: Wednesday, January 17, 2024 7:35 AM To: Ada-Rapporteur-Group/User-Community-Input Cc: Subscribed Subject: Re: [Ada-Rapporteur-Group/User-Community-Input] String_Access in unbounded string handling? (Issue #79)

It would be too disruptive to simply delete it. It could conceivably be moved to a new package, though it is not obvious where would make any more sense.

- Reply to this email directly, view https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/79#issu ecomment-1895827056 it on GitHub, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT65YN6T2ZZEDFSX5P2M35TYO 7HSBAVCNFSM6AAAAABB6EYS3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJVHAZDO MBVGY . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/AT65YN6XLSBL3WC5MDSQMADYO7HSBA5CNFS M6AAAAABB6EYS3WWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTT RAADHA.gif Message ID: @.***>