Sure, PHP is full of inconsistencies and irregularities. You know what else is? English.
Luckily, programming languages are a bit easier to learn and replace than spoken languages.
121–130 of 514 posts
Sure, PHP is full of inconsistencies and irregularities. You know what else is? English.
Luckily, programming languages are a bit easier to learn and replace than spoken languages.
Earlier quoted context omitted.
> what makes PHP so great for beginners? From what I can see and aside from the ease of install, it is the namespace. You type Sometimes everything not being an object helps, but only in the short run. It's not great, but it's the easiest to grasp.
from * import
A nit: "Subclasses cannot override private methods. Subclass overrides of public methods can’t even see, let alone call, the superclass’s private methods. Problematic for, say, test mocks." IMHO you don't want private methods to be visible in subclasses, because this makes the fragile base class problem worse. If I'm a framework developer working on a UI library, I should be free to add private methods to my Button c…
Namespacing within an inheritance tree is a problem, yes, but just hiding as much of your namespace as possible sucks. As does ahem ahem double-underscore prefixing. Surely there's another option here, but until someone figures out what it is, I'm okay risking collisions.
If you look behind each one of the features you will find that they aren't 'design decisions' but rather a consequence of circumstance.
Most of what is being discussed in this post doesn't really matter because:
a) most PHP developers will never touch some of the smaller nuances
b) newer versions of PHP are changing things (and people still keep using older version. there was an entire holdout movement with version 4). this entire post could have been pulled from the PHP issue tracker.
c) super duper huge websites and web applications are being built with PHP
I don't consider myself a PHP developer, but the argument about it being useless in spite of all the evidence is just ridiculous.
Fortunately there are many options when it comes to web development. You don't like PHP? Avoid it! Do not use it! Use Ruby or something.
I used to get cranky about Facebook. Now I don't use at all.. what do I feel about Facebook now? Nothing. No point getting your pants in a twist about something that doesn't need to a part of your life.
I had a one-to-one talk with Rasmus Lerdorf a few weeks ago. This is one of the few things he said: " I wrote PHP as a hammer to do my stuff. Around 1993, the only way to write web apps was by hacking C and Perl. This was extremely painful, and you would have to do the same thing over and over again. So I started writing a tool which would make my work easier. " " I never thought while writing PHP that someday millio…
A nit: "Subclasses cannot override private methods. Subclass overrides of public methods can’t even see, let alone call, the superclass’s private methods. Problematic for, say, test mocks." IMHO you don't want private methods to be visible in subclasses, because this makes the fragile base class problem worse. If I'm a framework developer working on a UI library, I should be free to add private methods to my Button c…
Little new functionality is implemented as new syntax; most of it is done with functions or things that look like functions. That's a problem? I think it's a problem if new functionality can't be implemented as part of a library. I think it's a problem if the best way of implementing new functionality is always to have new syntax.
Earlier quoted context omitted.
from * import
That's an additional magic incantation people have to learn to add to the start of every file. In PHP, that magic incantation is invisible because they never have to type it or even know that it exists.
Maybe new devs should learn Perl, instead... http://search.cpan.org/~adamk/Acme-Everything-1.01/lib/Acme/...