Hacker News new | ask | show | jobs
by allan_s 2021 days ago
I have started one side project , and one startup this last 3 month, all in php/symfony, though I have made extensive use of python (and php) in the past (and do a lot of rust on the side)

1. A mature ecosystem: Symfony is really really mature, all use case of a classic website are covered:

   * easy "admin" generation -> check

   * easy styling of your forms (a guy already made a 'tailwind' template, now I just do {{ form(my_form }}, and that's it

   * easy integration with webpack for my usecase with tailwind

   * pretty fast load to the point that the backoffice feels like a SPA (no flickering)

   * word-class ORM (Doctrine is just the best ORM ever, they really got right the 'if you know SQL, you will not have to learn yet an other dialect, all our functions/method use the exact same naming as in SQL , take that django ORM)

   * once again word-class ORM (Doctrine make it very easy to use all postgres-only, or mind you, mysql-only feature, DATE_TRUNC , json operators, full-text search operators  etc. etc.)

   * The documentation is not only encyclopedic , but also 'cookbook' (i.e you can either go A to Z, or they have dedicated article "how to have 2 database" , "How to implement a login through JSON" , which are much better and up to date than googling "how to X with framework Z"
2. PHP type system, sorry python but mypy just doesn't make it, I love my typechecking at runtime, how many times good willing developers in python have put `def myfunction(something: dict)` but it was actually not a dict, but a generator, and boom the next dev is mislead and introduce a bug

3. easy as hell to find developers, developers that likes to get things done and that are pragmatic (They know, I know, we all know PHP have shortcomings, do we joke about it? yes. Does it prevent us from moving forward ? no)

1 comments

You have invested a lot of time into PHP and can make a living out of it. More power to you!

But from my anecdotal experience not many new developers invest the time to learn PHP. At the two universities I've been to, PHP is usually one and done thing. You take one course or just a few lessons with PHP in web development class and then move on to other things.

I also got the same kind of class, I think php was a 2 week class (less than the Java courses or SQL courses, same as the ASM courses).

a 2/3 of my career was python, I 2~3 years of PHP around 2011-2014, and now I'm using it back as I'm finally doing my own company.

And the best part of it ? It's right where I left it, even thought it went from 5.4 to 8 , and from symfony 2 to 5. It feels like leaving your old band from college to find out you all have the same habits, just everyone improved along the road.

Regardless how much I like python, to have been the one needing to own the "python2 to 3 migration" projects of 3 companies, it was not pretty.

My anecdotal experience is that in university, the only programming languages I learned where C, C++, and COBOL.

The rest was data structures, algorithms, etc. I've picked up many languages over the years and just applied CS concepts on them.