On 05/06/2011, at 11:29 PM, Benoit Daloze wrote:
> Clifford Heath wrote:
>> That is, the problem is that it's not obvious to a newcomer that  
>> __FILE__ means
>> the current source-code file, or that $0 means the name of the script
>> being executed. Especially the latter...
>
> $PROGRAM_NAME is an alias for $0.
> But "if __FILE__ == $PROGRAM_NAME" is quite long.

Length is not a problem, if the text includes the meaning.

Things that are used often should be succinct, and the reader's
knowledge should be assumed. Things that are used only a
few times in a program do not need to be succinct.

To use an API call requires that the user knows (or looks up)
the meaning. This kind of semantic hiding is completely
unnecessary and *counter-productive*.

Clifford Heath.