Changeset 05217bb for content


Ignore:
Timestamp:
Jul 16, 2022, 1:08:43 PM (2 years ago)
Author:
Mikhail Kirillov <w96k@…>
Branches:
master
Children:
4d3065b
Parents:
8ff16b8
Message:

Php add one sentence

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/en/posts/php-review.org

    r8ff16b8 r05217bb  
    161161
    162162*** 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).
     163Symfony and PHP heavily rely on OOP. I call it procedural because it is
     164not like Smalltalk or Lisp OOP where you can extend anything. I don't
     165like several things in that paradigm. The first is access modificators
     166which makes a developer of a library in charge of its user. Luckily
     167there is reflection in most OOP languages, so you can extend anything
     168you want. Many people think it is bad, but library devs can do mistakes
     169or just abandon their libraries and you want to modify them to work. The
     170second is Inversion of Control pattern. It is bad mostly by the same
     171reason as the first one, you lose control over some code. Instead of you
     172running the code it is someone else running your code (mostly
     173classes). Also as I said before because PHP has tons of C under the hood
     174you can't modify standard library which is sad.
    172175
    173176This is not so critical since all the code is available for free as in
Note: See TracChangeset for help on using the changeset viewer.