On Mon, Dec 12, 2005 at 12:30:47AM +0100, Leopold Toetsch wrote: > On Dec 11, 2005, at 23:45, Joshua Isom wrote: > >.IfDebug(1, > > print "var = " > > print var > >) > > As said, it was surprising me too. Anyway, I think typical use cases > are debugging and I prefer a solution that boils down to no code at all > for the non-debug case, like C's assert with -DNDEBUG.
Hm. Pondering... * PIR is primarily a compiler target, not a human language. (Pasm, in contrast, is an entirely non-human language.) So convenience is not paramount. * On the other hand, conditional compilation is cheap & helpful, so why not? * Forbidding commas in the expanded code is not OK. And requiring backwhacked commas isn't OK either: too ugly, too much work to add and remove conditionals around existing code. So I guess we just need a robust multi-line quoting convention (to pass multiple lines of code to macros). (Musing while typing:) How about using braces as balanced delimeters when an open brace is the first character: .IfDebug(1, { multi,line stuff,with,commas and even {nested} braces goes here }) -- Chip Salzenberg <[EMAIL PROTECTED]>