5 ms·
"healthy debate" Yes! This is what we do need, what we do NOT need is bullshit like "piddly shit" which you seemed to be defending. But please, tell me of one,
by xd 14y ago
"healthy debate" Yes! This is what we do need, what we do NOT need is bullshit like "piddly shit" which you seemed to be defending.
But please, tell me of one, just one, "severe flaw" you find in PHP, as it is today. And I will enter into a healthy debate with you.
- spacemanaki 14y agoNo, I absolutely was not defending language like "piddly shit". I was attacking language like "meaningless penis measuring contest". I think neither has a place on HN. I have nothing to say about PHP (because I've never used it) I was reacting to a specific comment in jbm's post, which generalized languages and debates around them. Sorry for derailing the thread from the topic of PHP, and I probably shouldn't have made a little dig with "severe flaw".
- Zak 14y agoI'll bite. PHP's automatic type conversion is a severe flaw. The intent was to make it easier for beginners to pick up the language without worrying about technical details like types, but it violates the "fail fast" principle. It might make it easier for beginners to write code that works some of the time, but at a cost of making it harder to write code that doesn't break in surprising ways later. It's not just that automatic coercion exists, but that the behavior is biased toward returning values that don't produce errors. Treating the string "three" as equal to the number 0 is very unlikely to be the desired behavior. Even if not emitting an error is desired, a contagious NaN value would make a lot more sense. There are certainly ways for an experienced user to mitigate the problem, but beginners don't know them, using them effectively requires discipline and a great deal of production code doesn't use them. The latter problem is cultural, but the language being tolerant of sloppy code naturally attracts people who write sloppy code to the language.
- deleted 14y ago[deleted]