Michael G Schwern schwern-at-pobox.com |Perl 6| wrote:
John M. Dlugosz wrote:
I'm not opposed to having it be "ro", but wonder why he didn't call it that
in the first place, so there must be a reason.

Nobody's perfect?

My other thought is that since parameters are read-only by default it's not
thought you'd have to write it much so clarity wins out over brevity, the flip
side of Huffamn encoding.  But that doesn't work out so good for normal
variable declarations.  The verbosity (which a hyphen would only make worse)
discourages "const-ing", as they say in C.


Perhaps he was thinking that 'constant' would be used there. But I agree, it's not the same thing. In C++ I often use const for things that are in 'auto' scope and initialized in the normal flow sequence.

Anyway, was 'ro' rejected for some good reason, $Larry, or was it simply considerate as not to waste a short word on a rare use since that's the default (for parameters)?

I agree that knowing 'rw', and that being common, if I wanted the other one and didn't use it every day, I would =guess= that it should be called 'ro' to match.

--John

Reply via email to