3 ms·
"PHP is inconsistent" is a myth cherished by haters. Besides, real world evidence is against your theoritical musings.
by colshrapnel 10y ago
"PHP is inconsistent" is a myth cherished by haters.
Besides, real world evidence is against your theoritical musings.
- bopinto 10y agoCare to disagree. E.g.: array_map (callable $callback, array $array1 [, array $... ] ) and array_filter (array $array [, callable $callback [, int $flag = 0 ]]) Both are operations over an array, but the arguments aren't in the same order. I understand the why, but it is not consistent and (in my opinion) wrong, from a point of view of writing a language. This also makes it more difficult for someone to learn the language, as it was said. Let me add that Rasmus admitted he didn't know how to write programming languages, when he wrote PHP. He just wanted something that was easy and fast for web designers to learn. That said, PHP is my go-to language when I what to get up something fast and with not much server side logic.
- colshrapnel 10y agoI've got a real good advise for you. Get yourself a good IDE with a code-completion feature. Trust me, the very next day you'll forget your grief :)
- TazeTSchnitzel 10y agoWhat myth? PHP has inconsistency throughout. It's one of the most commonly cited complaints about the standard library, for example, which lacks a consistent naming scheme, consistent parameter order, consistent error-handling behaviour, and so on.
- colshrapnel 10y agoYou guys are so fixed on that standard library thing that I am getting scared. In a way, it's the best compliment PHP can get, means nitpicking on the function names is all they can blame PHP for. Nevertheless, for me it never was a problem - neither at a time when I used to stick with FAR commander's internal editor, nor - especially - with PHPStorm nowadays, that always put the proper syntax under my fingertips, parameter order included. Consistent error handling is a matter of one set_error_handler() call. Ok, undeed PHP can be called inconsistent, if one would have a fancy to. And this opinion could be even defended with numerous examples... which examples, for some reason, do not work neither for learners who prefer PHP over "more consistent languages", nor professional developers, who just get their job done. To boil it down, I think this "inconsistency" argument works more for the internet discussion than for the real life consideration.
- babyrainbow 10y ago>do not work neither for learners who prefer PHP over "more consistent languages" They prefer Php because they don't know any better, because they are, well, learners. >nor professional developers, who just get their job done... Because they were the "learners" in the earlier statement. Now they are "professionals", but still don't know any better, because they were happy from the beginning, and there is a whole community of Php apologists who will provide validation, so they didn't bothered to look elsewhere. And someone who looked elsewhere saw a lot of unfamiliar stuff, and were turned off by it. So remained tied to php for ever...It is quite sad.
- colshrapnel 10y agoThat's just your speculations that you are trying to pull here, to support your point of view that contradicts with the real world evidence (PHP is popular). Honestly, you are claiming that all these people are dumb and lazy. I respect some snobbery but apparently not up to that point.
- TazeTSchnitzel 10y ago> You guys are so fixed on that standard library thing that I am getting scared. It's hardly the only thing wrong with PHP, it's just one particular example. > Nevertheless, for me it never was a problem - neither at a time when I used to stick with FAR commander's internal editor, nor - especially - with PHPStorm nowadays How can it be especially not a problem? That would imply it was a problem and is now less of one. In any case, yes, you can maybe learn to deal with it, but it saves time to simply work with a language which doesn't have these problems. > Ok, undeed PHP can be called inconsistent, if one would have a fancy to. And this opinion could be even defended with numerous examples... which examples, for some reason, do not work neither for learners who prefer PHP over "more consistent languages", nor professional developers, who just get their job done. Can you actually defend why these examples “don't work”? Learners and professionals alike have to deal with PHP's quirks.