- Timestamp:
- Jul 16, 2022, 1:08:43 PM (2 years ago)
- Branches:
- master
- Children:
- 4d3065b
- Parents:
- 8ff16b8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
content/en/posts/php-review.org
r8ff16b8 r05217bb 161 161 162 162 *** Why procedural OOP might be bad 163 Symfony and PHP heavily rely on OOP. I don't like several things in that 164 paradigm. The first is access modificators which makes a developer of a 165 library in charge of its user. Luckily there is reflection in most OOP 166 languages, so you can extend anything you want. Many people think it is 167 bad, but library devs can do mistakes or just abandon their libraries 168 and you want to modify them to work. The second is Inversion of Control 169 pattern. It is bad mostly by the same reason as the first one, you lose 170 control over some code. Instead of you running the code it is someone 171 else running your code (mostly classes). 163 Symfony and PHP heavily rely on OOP. I call it procedural because it is 164 not like Smalltalk or Lisp OOP where you can extend anything. I don't 165 like several things in that paradigm. The first is access modificators 166 which makes a developer of a library in charge of its user. Luckily 167 there is reflection in most OOP languages, so you can extend anything 168 you want. Many people think it is bad, but library devs can do mistakes 169 or just abandon their libraries and you want to modify them to work. The 170 second is Inversion of Control pattern. It is bad mostly by the same 171 reason as the first one, you lose control over some code. Instead of you 172 running the code it is someone else running your code (mostly 173 classes). Also as I said before because PHP has tons of C under the hood 174 you can't modify standard library which is sad. 172 175 173 176 This is not so critical since all the code is available for free as in
Note:
See TracChangeset
for help on using the changeset viewer.