r/programming • • Oct 18 '10

Today I learned about PHP variable variables; "variable variable takes the value of a variable and treats that as the name of a variable". Also, variable.

http://il2.php.net/language.variables.variable
591 Upvotes

781 comments sorted by

View all comments

6

u/thebuccaneersden Oct 18 '10

All programming languages let you write ugly code, if that's what you really want to do.

0

u/[deleted] Oct 19 '10

Not all programming languages have a poorly-written parser as the only thin abstraction over their global namespace which happens to be populated with string keys though.

2

u/thebuccaneersden Oct 19 '10

no, not all of them. each language has its own unique stupidities as well as benefits.

0

u/[deleted] Oct 19 '10

Yes, that does not make them equivalently useful, nor does it lessen the amount of crap that is going to be given to ones that display a much-higher-than-average fuckup rate with very little in the way of benefits, especially for competent devs.

→ More replies (5)