They are not just numerically indexed but actually a freakish crossbreed of pretty much everything and can be treated as an array, list, hash table, dictionary, collection, stack, queue, and probably more. Variables are created and initialized whenever they are used for the first time, which is just bound to result in errors that are caused by typos.Īrrays are yet another weird quirk you’ll have to endure. What’s worse is just that there isn’t even a way to declare variables. This already sucks in my opinion, but I won’t hold it against PHP since it is fairly common among scripting languages. PHP uses the dynamic typing approach with types being determined at runtime based on how they are used in any particular situation. There is nothing wrong with a language that is designed for small-scale applications, but what PHP has become and what it is being used for is clearly far away from all intentions during its inception - a personal toolkit for its creator. Apparently, way too less brainpower has been invested into scalability (or into anything) during the probably non-existent design process. Of course, this is totally fine except that it grew too large over time. From the start, PHP has been designed with beginners in mind whose sole goal is to create simple, database driven websites. Nowadays it tries hard to be like Java or other modern, object oriented languages. Obviously, PHP started as a procedural language – or did it? Actually, it started as some weird html-meta-language, called PHP/FI that looked something like this: 1ĭoesn’t this just look beautifully awful? It might have had some kind of weird masochistic use a couple of centuries ago for simple websites, but still - Yikes! After that, PHP seemed to have adopted a more natural kind of the procedural paradigm as we know it today, fairly similar to the style found in C. There is one underlying issue with all this: PHP doesn’t follow a distinct path. Naturally, it comes with some of its own, totally arbitrary design choices that almost never seem to make sense. It is also related to Perl - which is probably where it got some of it quirks from. Its syntax seems to be heavily influenced by Java with a slightly lower degree of verbosity while its library framework is more like a bunch of C-style functions with cryptic names. Language DesignĪs any other language, PHP took a look at its predecessors. I’d even go so far and say that PHP deliberately tries to be the complete opposite of what makes up a good language, with every “feature” being somehow broken in its own way. While portability and performance are usually implementation-dependent, predictability and consistency are logical traits that I expect to find in any language. Unfortunately, PHP doesn’t really have any of these characteristics. If you think about what’s important in terms of programming languages, you might come up with some buzzwords like portability, performance, predictability, consistency, and so on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |