News for hackers. Stuff that matters.
Re:Modern PHP by dylan604 on Sunday March 27, 2022 @11:29AM (#30820989)
jquery, lodash, etc all added prefixes (or TIL: sigil) of somesort
Re:Modern PHP by nobleach on Sunday March 27, 2022 @11:48AM (#30821162)
jQuery's $ and lodash's _ are not prepended to a symbol to denote a variable. Both are objects actually. In the case of jQuery, $ === jQuery (the root jQuery object). The case that the parent is talking about is PHP's requirement that all variables are denoted as such `$variable_name`. (Perl and Bash also do this)
Re:Modern PHP by dylan604 on Sunday March 27, 2022 @01:05PM (#30821864)
i forget that's what's actually being done under the hood.
Re:Modern PHP by graftak on Sunday March 27, 2022 @11:51AM (#30821207)
That’s just (part of) the variable name and not really the same.
Re:Modern PHP by throw_m239339 on Sunday March 27, 2022 @12:52PM (#30821749)
> jquery, lodash, etc all added prefixes (or TIL: sigil) of somesort

This is false they are not sigils at all. _ and $ are legal variable names in Javascript.