News for hackers. Stuff that matters.
Re:If PHP Were British (2011) by ksangeelee on Friday December 02, 2022 @05:50AM (#33828909)
The '$' being used in variable names I think originates from the word 'string', from when it was necessary to differentiate types of variable in the code. It never related to currency.
Re:If PHP Were British (2011) by martin_a on Friday December 02, 2022 @06:02AM (#33828987)
I really think you shouldn't take the article, its conclusions and recommendations too serious.
Re:If PHP Were British (2011) by dools on Friday December 02, 2022 @06:24AM (#33829123)
You mean ... seriously?
Re:If PHP Were British (2011) by shaftoe444 on Friday December 02, 2022 @06:00AM (#33828969)
A bit like people who get annoyed by the word soccer, an English word originally to distinguish Association Football (soccer) from Rugby Football (rugger) and other codes.
Re:If PHP Were British (2011) by dylan604 on Friday December 02, 2022 @06:32AM (#33829170)
My new favorite piss take of this debate:

https://www.youtube.com/watch?v=CGVKVTcfy2E

Re:If PHP Were British (2011) by bearmode on Friday December 02, 2022 @06:08AM (#33829034)
Worth noting that this word also has class connotations, in that only toffs at Oxford called it soccer. Working class people never did.
Re:If PHP Were British (2011) by elric on Friday December 02, 2022 @07:54AM (#33829853)
I always assumed it originated with Perl, where $ is for scalars and @ for arrays.
Re:If PHP Were British (2011) by avian on Friday December 02, 2022 @08:15AM (#33830040)
I'm sure this use of $ character is much older than Perl.

One counter-example I know first hand: Sinclair ROM BASIC uses $ for denoting strings, in both variable and function names.

The one I have in a Spectrum is copyrighted 1982, around 5 years before first Perl was released.

I'm sure there are older examples like this.

Re:If PHP Were British (2011) by elric on Friday December 02, 2022 @08:52AM (#33830389)
You're right, seems like this usage goes back to at least 1964 in BASIC.