Bug #48669: PHP includes 'goto'

Talk about computers, hardware, applications, and consumer electronics.
User avatar
Global Mod
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

Postby scythe » 2009.08.21 (23:25)

Ahaha.
why turn the language into a public menace?
Too late!
As soon as we wish to be happier, we are no longer happy.

User avatar
Ego Lancer
Posts: 303
Joined: 2008.09.26 (06:13)
NUMA Profile: http://nmaps.net/user/PsychoSnail
MBTI Type: ISTP
Location: The Gaming subforum

Postby PsychoSnail » 2009.08.22 (04:28)

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.
spoiler

Image
Opera innovates, Firefox emulates.
Last updated: September 27th, 2009


User avatar
Retrofuturist
Posts: 3131
Joined: 2008.09.19 (06:55)
MBTI Type: ENTP
Location: California, USA
Contact:

Postby t̷s͢uk̕a͡t͜ư » 2009.08.22 (05:19)

Yeah, PHP even has "variable variables."

To illustrate:

Code: Select all

$foo = "bar";
$bar = 3;
print $$foo;
...will print "3".

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]
spoiler

Image


User avatar
Albany, New York
Posts: 521
Joined: 2008.09.28 (02:00)
MBTI Type: INTJ
Location: Inner SE Portland, OR
Contact:

Postby jean-luc » 2009.08.30 (04:57)

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.'
-- I might be stupid, but that's a risk we're going to have to take. --
Image
Website! Photography! Robots! Facebook!
The latest computers from Japan can also perform magical operations.

User avatar
Lifer
Posts: 1099
Joined: 2008.09.26 (21:35)
NUMA Profile: http://nmaps.net/user/smartalco
MBTI Type: INTJ

Postby smartalco » 2009.08.30 (16:42)

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.
This. php.net has the best documentation of just about anything I have ever used (with a competent search to boot).
Image
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!"

User avatar
La historia me absolverá
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:

Postby 乳头的早餐谷物 » 2009.08.31 (08:57)

smartalco wrote:
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.
This. php.net has the best documentation of just about anything I have ever used (with a competent search to boot).
And the documentation needs to be good, because otherwise with PHP's disorganised functions you'd never be able find your way around.
M E A T N E T 1 9 9 2

Image

User avatar
Retrofuturist
Posts: 3131
Joined: 2008.09.19 (06:55)
MBTI Type: ENTP
Location: California, USA
Contact:

Postby t̷s͢uk̕a͡t͜ư » 2009.09.01 (00:04)

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.'
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.

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]
spoiler

Image


User avatar
Global Mod
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

Postby scythe » 2009.09.02 (03:24)

smartalco wrote:
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.
This. php.net has the best documentation of just about anything I have ever used (with a competent search to boot).
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.
http://mislav.uniqpath.com/poignant-guide/
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.
PHP's syntax doesn't do a whole lot to make that easier. mod_php's <?php ?> tags do that.
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.
Perl, Python, Ruby, and Lua are all less verbose than PHP.

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.
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.
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.
As soon as we wish to be happier, we are no longer happy.


Who is online

Users browsing this forum: No registered users and 8 guests