| |
LCS-2016-018 |
| |
2 |
| |
11-Jan-2017 |
| |
Approved |
O'SUBTYPE is in no
relation to T'XXX attributes, other then someone attached a leftover attribute to the nearest fitting headline. So in my eyes, we should
clean it up and spend a separate sub-section for object attributes.
--
-- O'attribute shorthands for O'SUBTYPE'attribute are going to lead to odd looking code, for example report xyz'image(xyz).
Yes it is shorter than xyz'subtype'image(xyz) but both forms are error prone (i.e. abc'image(xyz)). Something like report xyz'image or
report image(xyz) is far better form and avoids a latent issue as well as simply avoiding to have to list the object twice in order to get it
completely correct.
-- O'SUBTYPE'attribute are going to lead to odd looking code, for example report xyz'image(xyz)
PL: Please review the definition of for example 'IMAGE for objects. 'IMAGE has no parameter anymore, so it's just xyz'image
-- T'LEFT remains unchanged, and O'LEFT is described later as being explicitly equal to O'SUBTYPE'LEFT .
It makes the table longer, but more graspable. You don't even need to restrict the kinds of O that are usable, it's always equivalent to
O'SUBTYPE'LEFT even if it then throws an error because the result of O'SUBTYPE doesn't have a 'LEFT .
Point 2 I don't think needs addressing. Attributes are processed from left to right, so of course anything that yields a type looks like a T
when you hit the next tick mark.
Right now I'm marking my vote as an abstain. From a technical standpoint I want these things implemented the way it says above; I think it will
make VHDL code more readable. But as written, it definitely turns what is currently one of the more readable sections of the LRM into an
impenetrable text wall.
Also, of far less importance, are you sure the Kind: of P'LENGTH is "Pure function" rather than "Value"?
-- O that are usable, it's always equivalent to O'SUBTYPE'LEFT even if...
KJ: O'LEFT might not always be equivalent to O'SUBTYPE'LEFT depending on whether LCS 72a is adopted or not. If the object happens to be a
parameter to a subprogram, then within that subprogram, LCS 18 and LCS 72a conspire to make O'LEFT to be the attribute from the actual whereas
O'SUBTYPE'LEFT would remain as it is today which is to return the attribute from the formal.
-- 'LEFT should sound familiar as it is patterned exactly from the array attributes. I would prefer
that we write both in the same style. Since it is not practical to split the array attributes, it seems logical to keep scalar types and objects
together.
@KJ I do not see anything here that allows O'LEFT return the actual of a subprogram.
--