[arrays]: The OQ3 Spec refers to the term constructor
but does not define what it means
#449
Labels
clarify specification
Change text of spec, not (mainly) semantics of spec
What is the expected enhancement?
The OQ3 Spec for Arrays contains the following statement:
constructors
are associated with object-oriented programming languages:https://en.wikipedia.org/wiki/Constructor_(object-oriented_programming)
The term
constructor
and its semantics are not defined in the current OpenQASM3 Spec. The OpenQASM3 Language does not support user-definedtypes
.Using
constructors
as means of instantiating object instances has consequences.For starters,
constructors
assume a Memory Model, which OpenQASM3 does not have. Furthermore, the presence ofconstructors
as means of instantiating objects implies the existence and definition of correspondingdestructors
.If OpenQASM3 is to become an object-oriented language, then
constructors
anddestructors
should be fully defined in the Specification. If not, the reference to the termconstructor
should be removed from the Spec, because it refers to a non-existent language feature.Side-note: arrays don't have constructors.
Also of concern is the reference - in the same sentence - to the concept of
base type
. That is, again, a concept borrowed from object-oriented languages. This concept assumes inheritance - single or multiple. The concept ofinheritance
is not defined in OpenQASM3, as it is not a supported feature of the language. The use of the termbase type
in the current Spec is confusing and misleading, and should be removed from the Spec.The text was updated successfully, but these errors were encountered: