At 01:16 PM 4/27/2001 -0700, Larry Wall wrote:
>Dan Sugalski writes:
>: It's also the one reason that I really like the idea of policy files of
>: some sort, to allow sites that don't want this sort of thing to forbid it.
>: I'm not talking things like perl automagically loading policy files in.
>: Rather having "use site_policy;" set limits that can't be undone at all
>: easily, or something like that. Site management can mandate its use and
>: wield the appropriate baseball bat if it isn't followed.
>
>If the site refuses to install the module that tweaks the syntax, that
>will enforce site policy quite effectively.  It's possible that we could
>take an administrative approach to make sure all such modules go into
>Tweaks:: or some such, so they can be easily detected.  I'm reminded that
>you couldn't get Ada to do dangerous things without saying
>
>     with UNCHECKED_TYPE_CONVERSION;
>
>or some such glaring declaration at the top.

Well, I'm reminded of a place I worked at for quite a while. Almost all our 
code was in BASIC-PLUS on RSTS/E machines. Production source modules all 
had a boilerplate header at the top that, amongst other things, brought in 
some code that forced variable declarations and suchlihe things. Every 
significant piece of source that went out to customer sites had it at the 
top. Quick hack code, on the other hand, didn't have to have it (though 
often as not we did it anyway) and for ten or twenty line toss-off programs 
we probably didn't bother with it, and the rules were looser. The compiler 
itself wasn't locked into the strict mode.

That's what I'm thinking of here. One perl install would be on a system 
with the capability of policy enforcement if the programmer so chooses. 
(The choice being dictated by non-computer means) Two or three line hacks 
wouldn't have it, while larger source modules might.

Besides, having the site administrator forbid the installation of parser 
tweaks might not be what is wanted. If we get PPython in there, a site may 
well have a Python.pm module handy, and source might start:

   use site_policy qw(Python);

for modules that were all-Python, or

   use site_policy qw(Perl);

for ones that were all-perl. The site-policy file would, amongst other 
things, perhaps lock down the parser so you couldn't switch languages in 
mid-file.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to