1 Feb 2004 02:07
Re: Easy-return
At 02:28 PM 1/31/2004 Saturday, Dean Tribble wrote:
>This is how Smalltalk shows return, so it feels comfortable to me, but I
>have an objection that in principle, [...], and
>using the return keyword is more "familiar".
At 02:35 PM 1/31/2004 Saturday, Ka-Ping Yee wrote:
>Get rid of "^"! Every other commonly used scripting language uses the
>"return" keyword. Using "return" allows new programmers to learn by
>example. Using "^" will bewilder them.
At 03:59 PM 1/31/2004 Saturday, Chip Morningstar wrote:
>E follows the lexical tradition of C, C++ and Java, not Smalltalk. The
>C-tradition languages all use "return". That's a sufficiently compelling
>justification to me. C-tradition programmers will immediately understand
>"return" but be confused by "^"
(And I remember Zooko chiming in along similar lines.)
Yes, everything everyone says above makes sense in theory. But because
E uses lambda evaluation for object creation, rather than classes or
prototypes, the verbose "return would appear way too often and
inappropriately for my eyeballs. In the proposed easy-return style without
unary prefix "^":
def makePoint(x, y) {
return def point {
to getX() { return x }
to getY() { return y }
}
}
(Continue reading)
>*Do* you care if the generator of new keys has that ability to manipulate the
RSS Feed