Subject: Re: new feature for src/usr.bin/make: read-only variables
To: None <tech-userlevel@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-userlevel
Date: 09/04/2005 19:45:50
On Sat, Sep 03, 2005 at 02:18:05PM -0700, Simon J. Gerraty wrote:
> Ignoring the merits of the idea (I'm not sure how much use it would get);
> The .READONLY form I could live with but not the .BEGIN/.END form.
I agree on that. The .READONLY form avoids most of the problems like
interaction with .for.
> Also, what are the semantics of a "readonly" variable when overridden on the
> command line? POSIX says the command line takes precedence - which is a
> generally useful property.
I'd say the semantic of .READONLY should be to warn or abort at any
future modification attempt for that variable. This would make the
behaviour agnostic to whether it is a command line, environmental or
normal variable. One more question which should be considered is what
counts as modification. The question is about lazy evalution or not.
Joerg