On Wednesday, March 26, 2003, at 04:29 AM, Adam Turoff wrote:


I've never come across a programmer who wishes he could do this
in C and have the compiler magically know what's what:

        int spam (int spam, char **spam) {
                int eggs;
                double spam;
                return 0;
        }

It's very obvious that the C programmer can't distinguish between spam and spam (no pun intended :-)).
That's the whole point of sigils!


Well, in Perl you don't use it like that, anyway. If you mean the scalar variant (portion)
if data you write $data. If you mean the array you write @data. (Note that in Perl6 the notion
of using the $ sigil when accessing the elements (as in $data[0]) is gone.)


IMHO the visuals are pretty clear and state the type of a variable not only at place it's been declared, but
rather all over the program. I really like that reminder when reviewing code (esp. when it's +10_000 lines ;-))



Kay




Reply via email to