Greg Wilson
Pragmas are a way to embed programs for the parser in the file being parsed.
I hope the BDFL has the good sense to run screaming from anything that has the word "pragma" in it. As this discussion demonstrates, it's far too fuzzy and open-ended a concept -- nobody can agree on what sort of thing a pragma is supposed to be. INTERVIEWER: Tell us how you came to be drawn into the world of pragmas. COMPILER WRITER: Well, it started off with little things. Just a few boolean flags, a way to turn asserts on and off, debug output, that sort of thing. I thought, what harm can it do? It's not like I'm doing anything you couldn't do with command line switches, right? Then it got a little bit heavier, integer values for optimisation levels, even the odd string or two. Before I knew it I was doing the real hard stuff, constant expressions, conditionals, the whole shooting box. Then one day when I put in a hook for making arbitrary calls into the interpreter, that was when I finally realised I had a problem... Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+