pat-rogers / Ada-202x-WG9-Informal-Review

This is the place for WG 9 members to submit informal comments on the 202x source document. (This is not the formal ballot that WG 9 will hold later in the process.)
0 stars 0 forks source link

4.2.1 (7/5): What *exactly* is passed to function named by String_Literal aspect? #116

Open sttaft opened 3 years ago

sttaft commented 3 years ago

4.2.1(7/5) says:

... The actual parameter of this notional call is a string_literal having the textual representation of the original (numeric or string) literal.

Does the textual representation of a string literal include the quotes on either end? And what about doubled quotation marks occurring in the middle? Based on the example of Roman_Number, I would guess the answer is the enclosing quotes are removed, and a doubled quotation mark becomes a single quotation mark, but that is not clear from this rule. I would suggest the following:

... The actual parameter of this notional call is a string_literal having the textual representation of the original (numeric or string) literal{; in the case of a string literal, the enclosing quotation marks from the original textual representation are not included, and doubled quotation marks in the textual representation are represented by a single quotation mark in the actual parameter}.

sttaft commented 3 years ago

On further thought, the string literal case to some extent makes more sense than the numeric literal case. How can a string literal have the same textual representation as a numeric literal? At a minimum it needs enclosing quotation marks. I think part of the confusion here is that we are swinging between a syntactic view and a semantic view, while not always being clear which one we mean at any given time. So perhaps this should be changed as follows:

... The actual parameter of this notional call is a string_literal {representing a sequence of characters that is the same as the sequence of characters in the original numeric literal, or the sequence represented by the original string} [having the textual representation of the original (numeric or string)] literal.

ARG-Editor commented 3 years ago

Your second suggestion here has one opening deletion bracket and two closing deletion brackets. What are you suggesting to be deleted???

sttaft commented 3 years ago

I have edited my suggestion. I meant to delete up through "(numeric or string)". I have also added "the sequence" to the second part of the sentence to try to clarify a bit.

ARG-Editor commented 3 years ago

OK, thanks. I put this one into the fix-up AI (AI12-0427-1) as it seems to be a real semantic change and thus sticking it into an Editorial Review would be a bit much (especially as the ARG isn't necessarily reading these threads).