Talk:Sigil (computer programming)
"In the PHP language, which was largely inspired by Perl" <--- uhh, what? I can't see any resemblence between PHP or Perl...
Quote:
This is the source of the long tradition of using "i", "j", "k" etc as the loop indexes of "for loops" in many programming languages—few of which have implicit typing).
It seems like this comes from math instead. As in, x sub i and x sub j
There is one thing that I find confusing about this article. In the second paragraph it is stated that Perl's sigils were adopted from the shell sigils. On the other hand, the first paragraph of Language comparision state that the $ in shell scripting is not a sigil. Isn't that a contradiction?
BernhardSchmalhofer (talk) 19:22, 27 March 2010 (UTC)
“$” precedes any variable name: I'd say it's an operator as in shell scripts. If $a is 1234, $ref is 'a' then $$ref is 1234. Which is understandable, because in PHP simply writing 'test' (without $ or quotes) means the string 'test' (if there's no constant defined as 'a')
--Terrakotta (talk) 10:11, 23 September 2010 (UTC)
Shell scripting, operator or not?
This page is confused as to whether shell scripting's '$' is a sigil or an operator. Historical context says "Larry Wall adopted shell scripting's use of sigils for his Perl programming language." but Similar phenomenon says "In Unix shell scripting and in utilities such as Makefiles, the "$" is a unary operator that translates the name of a variable into its contents. While this may seem similar to a sigil, it is properly a unary operator for lexical indirection, similar to the * indirection operator for pointers in C, as noticeable from the fact that the dollar sign is omitted when assigning to a variable."