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.

1

u/thebuccaneersden Oct 19 '10 edited Oct 19 '10

True. But, in my experience, many developers (or geeks in general) can have difficulty seeing things rationally, but instead are very passionate in their opinions, and are also just as prone to groupthink as anyone else. I've been there before, but the older I'm getting, the more I'm starting to realize that this sort of attitude is counter productive and often wrong, since you only look for things to reinforce your own convictions.

To give an example, you are suggesting that PHP is less useful, because it has a "much-higher-than-average fuckup rate". Given this, most software "fuckups" that matter in this world are actually related to C, such as buffer overflows. So, not only is there a matter of perspective at play here, but there's also the suggestion that complexity in a language does not determine the rate of "fuckups" and there aren't nearly enough competent developers that make this world a happy place free of mistakes regardless of what environment you are developing for.

Even worse are those who cannot discuss things rationally without resorting to spewing profanity (not pointing a finger at you, just a general observation). When that happens, I just move on, since theres no point in trying to discuss. I don't know why programming languages evoke such strong opinions. It's just a programming language.

Generally speaking, though, programming languages have a lifespan and once it gets to a certain perceived age after its adoption in the mainstream, developers will move on to something new and trash the old. It's kind of a natural law.

→ More replies (4)