On Wed, 6 Apr 2016, Randy Brukardt wrote: > wrote in message > news:alpine.DEB.2.20.1604062240350.29458@debian... > On Wed, 6 Apr 2016, ahlan@marriott.org wrote: >> procedure X(Formal: T) is raise; >> >> and >> >> function Y return T is raise; >> >> where "is raise" stands for "raise Program_Error". That may sometimes come >> handy in the context of inheritance, or so. > > (1) The above null procedure X does not and would never raise Program_Error, > so the first part of this doesn't make any sense. The OP suggested change the semantic and raise Programm_Error for the above null procedure. I just suggested a possible syntax if you really want to indicate "this is not yet implemented and will raise an exception if you dare calling it." On the other hand, the existing Ada 2012 syntax will *almost* serve that purpose. procedure X(Formal: out T) is null with pre => False; -- Procedure X will be implemented in a forthcoming update. -- Until then, don't even think of calling it! Alas, this seems only to work if T is tagged and the aspect is "pre'class", rather than plain "pre". > (2) The latter can be written in current Ada 2012: (that is, with TC1 > implemented) > function Y return T is (raise Program_Error); Great! I wasn't aware of that. I always thought, the expression in brackets had to be of type T. Stefan -------- I love the taste of Cryptanalysis in the morning! -------- www.uni-weimar.de/de/medien/professuren/mediensicherheit/people/stefan-lucks ----Stefan.Lucks (at) uni-weimar.de, Bauhaus-Universität Weimar, Germany----