develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [PATCH for discussion] new feature: clamp %hash

Thread Previous | Thread Next
Jeffrey Friedl
July 23, 2001 11:48
Re: [PATCH for discussion] new feature: clamp %hash
Message ID:

Abigail  <> wrote:
|> The real underlaying problems here are 1) Perl doesn't have structs,
|> but more importantly, 2) Perl only gives you one instance variable per
|> object. Pseudo-hashes tried to fix the symptoms, not the cause and
|> they didn't succeed. "clamp" tries to fix the symptoms too - and not
|> the cause.

Assuming that Perl had perfect object-oriented mechanisms (however anyone
wishes to define "perfect"), and in practice no one used hashes for
objects, would you find no benefit for having readonly/clamped hashes?

I think the ability to clamp a hash, and to make one readonly, would be
valuable in and of itself.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About