Why is there no comment in Ada with multiple blocks or blocks?

Why in Ada programming there are no comments with several or blocks, for example C / C ++ /* */ ?

+5
source share
1 answer

Ada 83 Justification Section 2.1 says

No form of inline comments (inside the line of text) is provided, as their usefulness is not enough to justify the additional complexity. Separate comments that are more than one line are not provided. Such comments will require a comment limiter for comments, and this will again cause dangers associated with the (inadvertent) absence of a closing separator: entire sections of the program can be ignored by the compiler if the programmer does not implement it, so the program will not mean what he thinks. Long comments can be written as a sequence of one-line comments, thus combining elegance with security.

Of course, modern IDEs will handle comments, but you may not notice, and the compiler, of course, will not.

+11
source

Source: https://habr.com/ru/post/1207478/


All Articles