PHP's Bad Reputation

  • (9 Pages)
  • +
  • « First
  • 6
  • 7
  • 8
  • 9

123 Replies - 47180 Views - Last Post: 15 January 2013 - 12:14 PM

#106 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11095
  • View blog
  • Posts: 18,982
  • Joined: 19-March 11

Re: PHP's Bad Reputation

Posted 13 January 2013 - 10:20 PM

View Poste_i_pi, on 14 January 2013 - 12:13 AM, said:

Ah crap on a stick, I just edited jons post instead of replying to it :(/> I'm so sorry jon, mea culpa



Well, I don't remember exactly what I said before, but I think this is probably better anyway. No harm done.
Was This Post Helpful? 0
  • +
  • -

#107 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1282
  • View blog
  • Posts: 4,091
  • Joined: 12-May 09

Re: PHP's Bad Reputation

Posted 13 January 2013 - 10:25 PM

View Poste_i_pi, on 14 January 2013 - 12:13 AM, said:

Ah crap on a stick, I just edited jons post instead of replying to it :(/> I'm so sorry jon, mea culpa

BURN THE IMPOSTER
Was This Post Helpful? 0
  • +
  • -

#108 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11095
  • View blog
  • Posts: 18,982
  • Joined: 19-March 11

Re: PHP's Bad Reputation

Posted 13 January 2013 - 10:29 PM

View Postxclite, on 14 January 2013 - 12:25 AM, said:

View Poste_i_pi, on 14 January 2013 - 12:13 AM, said:

Ah crap on a stick, I just edited jons post instead of replying to it :(/>/> I'm so sorry jon, mea culpa

BURN THE IMPOSTER


It's okay, I fixed it. Better than what I had before, actually.
Was This Post Helpful? 0
  • +
  • -

#109 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3796
  • View blog
  • Posts: 13,742
  • Joined: 08-August 08

Re: PHP's Bad Reputation

Posted 14 January 2013 - 09:29 AM

View Postjon.kiparsky, on 14 January 2013 - 12:56 AM, said:

Quote

No it doesn't. Making sure those bits are the ones you want is up to you, the developer, and this choice doesn't prevent you from doing that. All it does is allow you to not do it if you so choose.


This seems like what it means is probably not what you meant to say. A language is a tool for generating code, by which we presumably mean correct code.
Under what circumstances would we not want to generate correct code?
And how is it anything but a failure if your language encourages you to get it wrong?

No, it's more like: if you're going to use this feature then you should be aware that you're using it and make sure that you're using it correctly. Yes, I can write code that ends up doing something like $x = "1" + "twenty"; but that would be my fault. Blaming the language would be a cop out.

This post has been edited by CTphpnwb: 14 January 2013 - 09:30 AM

Was This Post Helpful? 3
  • +
  • -

#110 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1282
  • View blog
  • Posts: 4,091
  • Joined: 12-May 09

Re: PHP's Bad Reputation

Posted 14 January 2013 - 10:51 AM

If my hammer has a sawblade for a handle, are you *sure* I can't lay some blame on the tool?
Was This Post Helpful? 2
  • +
  • -

#111 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11095
  • View blog
  • Posts: 18,982
  • Joined: 19-March 11

Re: PHP's Bad Reputation

Posted 14 January 2013 - 11:03 AM

View PostCTphpnwb, on 14 January 2013 - 11:29 AM, said:

Yes, I can write code that ends up doing something like $x = "1" + "twenty"; but that would be my fault. Blaming the language would be a cop out.


If you believe that there's something to this idea of "language design" then it makes sense to look at the way the language is designed. If not, I guess you get what you get.
Was This Post Helpful? 2
  • +
  • -

#112 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4240
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: PHP's Bad Reputation

Posted 14 January 2013 - 01:24 PM

View Postxclite, on 14 January 2013 - 05:51 PM, said:

If my hammer has a sawblade for a handle, are you *sure* I can't lay some blame on the tool?

I don't know, I'd have to ask: What the hell were you thinking getting a hammer with a sawblade for a handle? There are subtly imperfect designs, and then there is obvious idiocy.

Nice work on the hugely over the top metaphor, by the way...
Was This Post Helpful? 1
  • +
  • -

#113 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4208
  • View blog
  • Posts: 13,283
  • Joined: 08-June 10

Re: PHP's Bad Reputation

Posted 14 January 2013 - 01:30 PM

funny fact: the internet wouldn’t be where it is now without Java​Script.
Was This Post Helpful? 0
  • +
  • -

#114 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11095
  • View blog
  • Posts: 18,982
  • Joined: 19-March 11

Re: PHP's Bad Reputation

Posted 14 January 2013 - 01:33 PM

View PostAtli, on 14 January 2013 - 03:24 PM, said:

There are subtly imperfect designs, and then there is obvious idiocy.


I think that's kind of what we've been saying...
Was This Post Helpful? 1
  • +
  • -

#115 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1282
  • View blog
  • Posts: 4,091
  • Joined: 12-May 09

Re: PHP's Bad Reputation

Posted 14 January 2013 - 01:53 PM

View PostAtli, on 14 January 2013 - 03:24 PM, said:

View Postxclite, on 14 January 2013 - 05:51 PM, said:

If my hammer has a sawblade for a handle, are you *sure* I can't lay some blame on the tool?

I don't know, I'd have to ask: What the hell were you thinking getting a hammer with a sawblade for a handle? There are subtly imperfect designs, and then there is obvious idiocy.

Nice work on the hugely over the top metaphor, by the way...

Hyperbole is a rhetorical tool. The question of whether or not that was hyperbole is up for debate.

View PostDormilich, on 14 January 2013 - 03:30 PM, said:

funny fact: the internet wouldn’t be where it is now without Java​Script.

For sure. Nobody's ever doubted the impact of JS or PHP.
Was This Post Helpful? 0
  • +
  • -

#116 lordofduct   User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2668
  • View blog
  • Posts: 4,786
  • Joined: 24-September 10

Re: PHP's Bad Reputation

Posted 14 January 2013 - 02:59 PM

*
POPULAR

I know this was early in the thread, and that e_i_pi already pointed out that it's mathematically sound. But I also want to add something to what e_i_pi said about it because Lemur said this in criticism of Javascript.

Quote

Nan == Nan => False


This is defined in the IEEE-754 definition of a floating point number.

It is not the fault of javascript in any way. In actuality javascript has no floating-point engine itself and instead uses the CPUs specification. Which if one doesn't exist (not common in this day and age) would be emulated by the operating system.

And you can also read here as to why it is so in the standard:
http://en.wikipedia.org/wiki/NaN

The mathematical analogue, as e_i_pi referenced, is the validation used in creating said standard. You could essentially look at it like 'undefined' or 'infinity' in mathematics. Infinity is not a value and therefore can not be equal to any value, nor is it equal with itself... because only values can be equal (mathematically speaking, because equality in math is defined on math terms). Two infinities are not the same... the famous 1/0 proves this. Taking the limits of 1/x as x approaches 0 shows that coming from the positive direction you shoot up infinitely positive, but from the negative you shoot down infinitely negative... 1/0 is in a duality there being infinitely small and large at the same time (hence also be referred to as undefined). Even 2 positive infinities aren't the same... 1/(x^2) approaches positive infinity from both direction, so does 1/(x^4). The ladder does so faster than the prior. So both positive infinities are not the same.

And thusly the foundation for why Nan would not equal Nan. Nan's purpose is to represent a none value... a float being in an error state.

This post has been edited by lordofduct: 14 January 2013 - 03:13 PM

Was This Post Helpful? 6
  • +
  • -

#117 ishkabible   User is offline

  • spelling expret
  • member icon





Reputation: 1747
  • View blog
  • Posts: 5,898
  • Joined: 03-August 09

Re: PHP's Bad Reputation

Posted 14 January 2013 - 03:13 PM

Quote

No, it's more like: if you're going to use this feature then you should be aware that you're using it and make sure that you're using it correctly. Yes, I can write code that ends up doing something like $x = "1" + "twenty"; but that would be my fault. Blaming the language would be a cop out.

while, yes, that would be the programmers fault I'd ideally want a language that helped me fix that issue instead of hiding it from me.

This post has been edited by ishkabible: 14 January 2013 - 04:22 PM

Was This Post Helpful? 1
  • +
  • -

#118 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3796
  • View blog
  • Posts: 13,742
  • Joined: 08-August 08

Re: PHP's Bad Reputation

Posted 14 January 2013 - 03:41 PM

View Postishkabible, on 14 January 2013 - 06:13 PM, said:

Quote

No, it's more like: if you're going to use this feature then you should be aware that you're using it and make sure that you're using it correctly. Yes, I can write code that ends up doing something like $x = "1" + "twenty"; but that would be my fault. Blaming the language would be a cop out.

yes, that would be the programmers fault I'd ideally want a language that helped me fix that issue not hid it from me.

Ideally I'd like to be able to tell the computer what I want and have it write the code for me. It would also point out where it fixed my human errors and ask me for corrections. This super-computer-language would have an unlimited knowledge of all subjects known to mankind, so nothing I wanted it to do would be beyond its capabilities. Until the day that's been developed we're all going to have to deal with imperfect languages. I'll choose not to single out any one language until then.
Was This Post Helpful? 0
  • +
  • -

#119 ishkabible   User is offline

  • spelling expret
  • member icon





Reputation: 1747
  • View blog
  • Posts: 5,898
  • Joined: 03-August 09

Re: PHP's Bad Reputation

Posted 14 January 2013 - 04:00 PM

your joke misses my point. while the technology to do what you speak of isn't here, the technology to have run time errors when stupid code that I wrote runs has been around for a number of decades. yes, we have to deal with imperfect languages but that doesn't mean we can't strive to do better.
Was This Post Helpful? 0
  • +
  • -

#120 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11095
  • View blog
  • Posts: 18,982
  • Joined: 19-March 11

Re: PHP's Bad Reputation

Posted 14 January 2013 - 04:03 PM

View PostCTphpnwb, on 14 January 2013 - 05:41 PM, said:

Ideally I'd like to be able to tell the computer what I want and have it write the code for me. It would also point out where it fixed my human errors and ask me for corrections. This super-computer-language would have an unlimited knowledge of all subjects known to mankind, so nothing I wanted it to do would be beyond its capabilities. Until the day that's been developed we're all going to have to deal with imperfect languages. I'll choose not to single out any one language until then.


Right, because there's absolutely no room for middle ground between plugging wires manually into the back of ENIAC on the one hand and, say, Skynet on the other. No advantage in using an assembly language over machine language, nothing gained by using C instead of assembly, no reason to use PHP instead of perl, no reason to choose one language for a purpose over some other. If the machine isn't reading your mind and doing the work for you, all languages are precisely identical, and there's no point whatsoever in talking about language design, because it's all just primitive garbage.
Of course, how stupid of me to think that there might be some difference in sophistication of design between, say, Dartmouth BASIC and Python. What an idiot I've been.

This post has been edited by jon.kiparsky: 14 January 2013 - 04:04 PM

Was This Post Helpful? 2
  • +
  • -

  • (9 Pages)
  • +
  • « First
  • 6
  • 7
  • 8
  • 9