> From: =?iso-8859-1?Q?Murat_=DCnalan?= <[EMAIL PROTECTED]> > Date: Sat, 4 Jan 2003 14:50:22 +0100 > > > > my int ($pre, $in, $post) is constant = (0..2); > > > > > > Two things "type and property" that belong so together > > > > Do they? Surely the type and constancy of a variable are > > entirely orthogonal to each other. > > Oh yes. Psycho-affectivly it is disturbing seeing the group of variables > ($pre, $in, $post) teared apart from the initilizing (0..2). This is my > second step in the brain when analysing it. And this is prone to > problems like in: > > my int ($one, $two, $three, $four, $five, $six, $seven ) is Prop( > 'camel', 'perl', 'camel', 'perl' ) = (0..6); > > where the distance grows with property-syntax-complexity.
In Perl 5, my int ($one = 0, $two = 1, $three = 2); is a fatal error. I could argue for this to change, as to support better readability (and it would). It's obvious WIM, so why doesn't it DWIM (disclaimer: cannot be used as an argument for arbitrary features. Is not a slogan. I repeat, is not a slogan. :) ? If you say that: my int ($one = 0, $two = 1, $three = 2) is constant; is seperating related parts, I disagree. I don't think C<constant> has anything to do with C<int>. Like Damian said, they're orthogonal concepts. > Suggestion: it could be pieced to > > my constant int ($pre, $in, $post ) = (0..2); > > which i guess is far superior (of course i hadn't done any field testing > and making statistics over it). It's not far superior. It's pretending like C<constant> is part of the type, which it isn't. > Btw: it is self-explanatory for many cross-language-programmers. Yes, but my int $foo is constant; Is self-explanatory for many language-speakers. If I recall, the set of cross-language-programmers is a proper subset of the set of language-speakers. It is clear which is clearer :). > Excerpt: Ony of my fears orginate from the idea that someone new to > perl6 could be put off by such hard nuts during the very basics of > variable decleration. What hard nuts? p6d is working on a fine nutcracker, in any case. Luke