in reply to Perl is more intuitive
Which are the variables and which are the function words?You know, if context cannot tell, and if you are only looking through a peephole (that is, seeing a few lines of code, and not a declaration of the variable or function), it usually doesn't matter. If one sees:
in a language where parenthesis aren't required after a function call, it really doesn't matter whether foo is a variable, or a function. It's printing the value of foo.print foo;
In fact, understanding programming in general becomes a lot easier if you view scalars, arrays and hashes as functions. A scalar is just a function that returns a fixed value (although you can later change what the value is). An array is just a function that takes an integer as argument, while a hash is a function that takes a string as argument.
I find sigils handy because they allow me to do interpolation. But for me, that's their only use. It doesn't make programs more cryptic or less cryptic.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl is more intuitive
by radiantmatrix (Parson) on Aug 19, 2005 at 15:40 UTC | |
|
Re^2: Perl is more intuitive
by kiat (Vicar) on Aug 19, 2005 at 15:26 UTC | |
by radiantmatrix (Parson) on Aug 19, 2005 at 15:30 UTC |