
On Mon, Sep 29, 2008 at 7:12 AM, Michele Simionato <michele.simionato@gmail.com> wrote:
I like Martin's proposals (use a function, remove -O) very much.
That's too bad, since I don't like it at all :-). You can write your own function trivially that does this; however IMO the *language* should support something that can be disabled to the point where no code is generated for it. Most languages have this (in fact Java *added* it). I'll concede that -O is not necessary the right flag to pass, but I do want to be able to write asserts that can be turned into nothing completely, and unless we were to add macros for just this purpose, it'll have to be something recognized by the compiler, like a statement. Most other details are negotiable (like the exact syntax, or the flag used to disable it). However I don't like changing the syntax so that it resembles a function call -- that's not going to resolve the existing confusion and will add more confusion ("why can't I write my own assert() function?"). -- --Guido van Rossum (home page: http://www.python.org/~guido/)