Earliest use of Comments as Semantically Meaningful Things in a Program?
Posted
by
Alan Storm
on Programmers
See other posts from Programmers
or by Alan Storm
Published on 2013-11-08T19:49:51Z
Indexed on
2013/11/08
22:14 UTC
Read the original article
Hit count: 245
In certain corners of the PHP meta-programming world, it's become fashionable to use PHPDoc comments as a mechanism for providing semantically meaningful information to a program. That is, other code will parse the doc blocks and do something significant with the information encoded in those comments.
Doctrine's annotations and code generation are an example of this.
What's the earliest (or some early) use of this technique? I have vague memories of some early java Design by Contract implementations doing similar things, but I'm not sure of those folks were inventing the technique, or if they got it from somewhere.
Mainly asking so I can provide some historical context for PHP developers who haven't come across the technique before, and are distrustful of it because it seems a little crazy pants.
© Programmers or respective owner