Too late!why turn the language into a public menace?
Bug #48669: PHP includes 'goto'
- Global Mod
- Posts: 1416
- Joined: 2008.09.26 (05:35)
- NUMA Profile: http://nmaps.net/user/scythe33
- MBTI Type: ENTP
- Location: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
As soon as we wish to be happier, we are no longer happy.
- Ego Lancer
- Posts: 303
- Joined: 2008.09.26 (06:13)
- NUMA Profile: http://nmaps.net/user/PsychoSnail
- MBTI Type: ISTP
- Location: The Gaming subforum
I don't really think goto is too bad, as long as you don't overuse it.
For some reason, Java has a goto keyword that doesn't do anything.
For some reason, Java has a goto keyword that doesn't do anything.
Opera innovates, Firefox emulates.
Last updated: September 27th, 2009
- Retrofuturist
- Posts: 3131
- Joined: 2008.09.19 (06:55)
- MBTI Type: ENTP
- Location: California, USA
- Contact:
Yeah, PHP even has "variable variables."
To illustrate:
...will print "3".
PHP is an amateurish sack of crap.
To illustrate:
Code: Select all
$foo = "bar";
$bar = 3;
print $$foo;
PHP is an amateurish sack of crap.
[spoiler="you know i always joked that it would be scary as hell to run into DMX in a dark ally, but secretly when i say 'DMX' i really mean 'Tsukatu'." -kai]"... and when i say 'scary as hell' i really mean 'tight pink shirt'." -kai[/spoiler][/i]
- Albany, New York
- Posts: 521
- Joined: 2008.09.28 (02:00)
- MBTI Type: INTJ
- Location: Inner SE Portland, OR
- Contact:
I really disagree with this general sense that PHP is crap. PHP is very flexible, which certainly enables some bad behavior, but also makes it fast to do complex things. There's a reason that the variable variable function exists in PHP, and it allows for some complicated algorithms that involve quite a bit more code in other languages. I think PHP's ease of use without sacrificing power makes it very competitive as a scripting language, and it's massive user base makes it an excellent choice for web work.
There seems to be a dislike of PHP because it allows things that typically would not work to work. I don't think enforcing strict code forms is really a vital feature of a language, and I'm suspect of people that dislike languages because of their flexibility. I've yet to see a compelling reason that there's really anything wrong with PHP. don't like a feature? just don't use it. I can show you plenty of crap in other languages that people consider more 'pure.'
There seems to be a dislike of PHP because it allows things that typically would not work to work. I don't think enforcing strict code forms is really a vital feature of a language, and I'm suspect of people that dislike languages because of their flexibility. I've yet to see a compelling reason that there's really anything wrong with PHP. don't like a feature? just don't use it. I can show you plenty of crap in other languages that people consider more 'pure.'
-- I might be stupid, but that's a risk we're going to have to take. --
Website! Photography! Robots! Facebook!
The latest computers from Japan can also perform magical operations.
Website! Photography! Robots! Facebook!
The latest computers from Japan can also perform magical operations.
- Lifer
- Posts: 1099
- Joined: 2008.09.26 (21:35)
- NUMA Profile: http://nmaps.net/user/smartalco
- MBTI Type: INTJ
This. php.net has the best documentation of just about anything I have ever used (with a competent search to boot).jean-luc wrote:I think PHP's ease of use without sacrificing power makes it very competitive as a scripting language, and it's massive user base makes it an excellent choice for web work.
Tycho: "I don't know why people ever, ever try to stop nerds from doing things. It's really the most incredible waste of time."
Adam Savage: "I reject your reality and substitute my own!"
- La historia me absolverá
- Posts: 2228
- Joined: 2008.09.19 (14:27)
- NUMA Profile: http://nmaps.net/user/maestro
- MBTI Type: INTP
- Location: Beijing
- Contact:
And the documentation needs to be good, because otherwise with PHP's disorganised functions you'd never be able find your way around.smartalco wrote:This. php.net has the best documentation of just about anything I have ever used (with a competent search to boot).jean-luc wrote:I think PHP's ease of use without sacrificing power makes it very competitive as a scripting language, and it's massive user base makes it an excellent choice for web work.
M E A T N E T 1 9 9 2
- Retrofuturist
- Posts: 3131
- Joined: 2008.09.19 (06:55)
- MBTI Type: ENTP
- Location: California, USA
- Contact:
I will continue to be openly hostile to anything that promotes terrible programming practice. Imagine a generation of programmers tainted by an inclination to hack their way through a problem because they're used to that being the appropriate means of solving one. Teamwork and organization go right out the friggin' window along with potential for easy documentation, and debugging would be a total nightmare.jean-luc wrote:I really disagree with this general sense that PHP is crap. PHP is very flexible, which certainly enables some bad behavior, but also makes it fast to do complex things. There's a reason that the variable variable function exists in PHP, and it allows for some complicated algorithms that involve quite a bit more code in other languages. I think PHP's ease of use without sacrificing power makes it very competitive as a scripting language, and it's massive user base makes it an excellent choice for web work.
There seems to be a dislike of PHP because it allows things that typically would not work to work. I don't think enforcing strict code forms is really a vital feature of a language, and I'm suspect of people that dislike languages because of their flexibility. I've yet to see a compelling reason that there's really anything wrong with PHP. don't like a feature? just don't use it. I can show you plenty of crap in other languages that people consider more 'pure.'
Back when I still did my job with Perl, I had a very nasty habit of completely outsmarting myself. I wasn't writing poetry, either -- I was using the language in a way that took advantage of its flexibility, and not in a needlessly complicated manner. In many cases, it would have taken far less time to just rewrite my code than try to make sense of it again, it wasn't usable or readable by anyone else but me, and tracking down bugs required hours and hours of unraveling my work. Yes, it was quick to write, extremely flexible, and a godsend for dirty one-time hacks, but it became abundantly clear that languages well adapted for these things should have no place for larger projects.
I was at one point an avid reader of Steve Yegge's blog, and he had an excellent post about why he attaches a negative weight to experience with Perl in his hiring decisions.
PHP ruins potentially good programmers. It's the new BASIC.
[spoiler="you know i always joked that it would be scary as hell to run into DMX in a dark ally, but secretly when i say 'DMX' i really mean 'Tsukatu'." -kai]"... and when i say 'scary as hell' i really mean 'tight pink shirt'." -kai[/spoiler][/i]
- Global Mod
- Posts: 1416
- Joined: 2008.09.26 (05:35)
- NUMA Profile: http://nmaps.net/user/scythe33
- MBTI Type: ENTP
- Location: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
The hell have you been using? php's documentation is nice, but at the very least Ruby is much nicer -- _why's ruby stuff was easily the best documentation available for anything, period.smartalco wrote:This. php.net has the best documentation of just about anything I have ever used (with a competent search to boot).jean-luc wrote:I think PHP's ease of use without sacrificing power makes it very competitive as a scripting language, and it's massive user base makes it an excellent choice for web work.
http://mislav.uniqpath.com/poignant-guide/
PHP's syntax doesn't do a whole lot to make that easier. mod_php's <?php ?> tags do that.I really disagree with this general sense that PHP is crap. PHP is very flexible, which certainly enables some bad behavior, but also makes it fast to do complex things.
Perl, Python, Ruby, and Lua are all less verbose than PHP.There's a reason that the variable variable function exists in PHP, and it allows for some complicated algorithms that involve quite a bit more code in other languages. I think PHP's ease of use without sacrificing power makes it very competitive as a scripting language, and it's massive user base makes it an excellent choice for web work.
What's funny is that PHP is not meant to appeal to new programmers. It's meant to appeal to C programmers, who don't want to deal with anything new. It is meant to look like C. Even printing is aped from C -- where do you think they came up with "printf"? It's not powerful in any meaningful way, it's usable and embeddable, which are excellent characteristics, but they're not characteristics of the language as of the implementation.
What are you comparing php to, Java? It only gained closures relatively recently, it still has that ugly $variable syntax, and, many languages can do variable->variable: it's called eval. Perl and Lisp are flexible. PHP is not flexible; it's just most people's introduction to duck typing.There seems to be a dislike of PHP because it allows things that typically would not work to work. I don't think enforcing strict code forms is really a vital feature of a language, and I'm suspect of people that dislike languages because of their flexibility.
As soon as we wish to be happier, we are no longer happy.
Who is online
Users browsing this forum: No registered users and 6 guests