| |
LCS-2016-099 |
| |
7 |
| |
21-Mar-2017 |
| |
Approved |
'low, 'high, and 'ascending? Why would you want to wrap this information into an
extra record? Are use cases so widespread that we should ask tool vendors to provide such records for you?
-- Ascending : BOOLEAN instead of Direction.
3) The type of an expression depends only upon the types of its operands and on the operators applied, see clause 9.1, bottom of page 117.
Thus, please remove the blue words "result" in the modifications for 8.5.
4) If you store 'LOW and 'HIGH in the record, then the direction will be always ascending. I think what you want instead is 'LEFT in LeftBound
and 'RIGHT in RightBound.
5) Within 8.5, this sentence is wrong: _The slice is a null slice if the discrete range is a null range or if the distance between
LowerBound and UpperBound (based on position numbers) is less or equal zero._
If LowerBounds / LeftBound equals UpperBound / RightBound then the slice has a length of 1. The definition should be also more explicit
and maybe written as a bulleted list:
The slice is a null slice: BOOLEAN is against the ideas of VHDL/Ada and also against strong typing. We have the ability to define 2 distinct integer types
so both cannot be mixed up. The LRM does it itself e.g. for SIDE. Even BOOLEAN itself could be represented by BIT. Both are predefined enumerations
of just two values. So I prefer a DIRECTION enumeration matching the corresponding EBNF rule.
MZ: 3) 'LEFT=/='RIGHT and 'LOW=/='HIGH are orthogonal values, convertible by 'ASCENDING. (See 16.2.2 - Note 1). LowerBound and UpperBound requires less conditions based on Direction.
MZ: 5) alias TIME_SPAN is TIME'RANGE_RECORD; constant MyTimeSpan : TIME_SPAN := (5 ns, 10 ns, ASCENDING);A future version could allow this:
constant MyTimeSpan : TIME_SPAN := TIME'(5 ns to 10 ns);--
implementation-specific data structure
but is not actually asked for in an implementation. Such a range record could be helpful for implementing a library workaround for a missing language feature but this is
all it is. And by itself, it really is just a shorthand for querying three attributes in a single step. It does not provide any of the desired range operations. I do not
think that it would be a good idea to establish this workaround in the standard because this will block the future thorough adoption of the proposal by the virtue of
compatibility issues.
--