develooper Front page | perl.perl6.language | Postings from May 2008

Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)

Thread Previous
From:
TSa
Date:
May 9, 2008 06:14
Subject:
Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)
Message ID:
48244E0B.4010206@barco.com
HaloO,

Carl Mäsak wrote:
> By the way, I hope it's possible to make the assignment `$x = 3` to
> the read-only variable $x a compile-time error.

I hope so, too. The variable and its read-only constraint
is known at compile time and *not* dependend on the value
inside. How it came in there in the first place is left
to the runtime binding ;)


Regards, TSa.
-- 

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About