develooper Front page | perl.perl5.porters | Postings from May 2000

Re: Proposed pragma: readonly - summary

May 22, 2000 23:29
Re: Proposed pragma: readonly - summary
Message ID:
In article <>,
"Mark Mielke" <> wrote:
> On Mon, May 22, 2000 at 03:34:54PM -0600, "Tom Christiansen" wrote:
> > It's like passing a law against naughty thoughts.  Or against
> > suicide.  Neither has any beneficial effect whatsoever, because the
> > determined will always be there to circumvent your wishes.  Only
> > education helps.
> You are mistaken.
> The law is already passed; what is being considered is enforcement at
> a level that be effective even against the incompetent.

I think I agree with Tom.  I didn't feel I completely understood the
point of Mark Summerfield's message to which Tom was replying, but the
gist of it seemed to me to be that there should be some way of
preventing the SCALAR slot of a glob from being changed, with the goal
of making sure the read only SV can't even be replaced.  This way lies
madness.  Do we go on to make sure the glob as a whole can't be
changed, even locally?  How about the package the glob is in?  Do we
bar the use of Safe when there are any constants lurking about that
might suddenly become not so constant anymore?

If someone wants a constant $pi of 3.1415926535897932 and then later
says *pi=\'gimme a slice', then that is what they want done.

Apologies if I misunderstood Mark S's point.
Totally useless math: i**i = (-1)**(.5i) = (e**((2n-1)*i*pi))**(.5i)
= e**(.5(1-2n)pi) = e**((.5+n)pi) for any integer n Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About