l3mming

joined 1 year ago
[–] l3mming@lemmy.fmhy.ml 1 points 1 year ago

Well, this is true. It's all about the right tool for the job. The PHP hammer is good at some things and bad at others. It is good for web development, it is bad for parsing [thanks to its truly awful regex functions], and it is way too bloated to be any kind of scripting language. Python is much better for parsing and transforming data, but its regex implementations are still pretty awful when compared to something like Perl. In fact, I still reach for Perl when I have to parse complex and unstructured text. Haven't yet reached for Perl 6 though.

[–] l3mming@lemmy.fmhy.ml 3 points 1 year ago

Similar 20+ years programmer here. Even before Lemmy Rust was top of my list for languages to learn. Now I've got a boost in motivation too.

[–] l3mming@lemmy.fmhy.ml 30 points 1 year ago (7 children)

I'm a web developer of 25+ years. These days python, php, react, vue stack. Formerly, C, C++, perl and assorted other oddities.

Forget what you once heard about PHP. Modern php is nothing like its early days. Modern php has some great constructs that give language expressiveness and fluidity, and that really lends itself to concise and beautiful code.
PHP also has some brilliant web frameworks (eg: Symfony) that make build web apps (be it REST APIs or frontend backends) just a pleasant experience all around. It's dead simple yet extremely powerful. This makes makes development and maintenance using PHP cheap. PHP's testing suite is also ridiculously powerful.

By comparison, I find python web frameworks (Django, flask etc), fiddly and finnicky to use. I also find Python a much less expressive language. By that I mean it will often take me several lines of code to do something that is otherwise a 1 liner in php. It just feels clunky and awkward.

Don't get me wrong. I once hated and laughed at PHP with the rest of them. But PHP has really evolved over the past 10 years, much more so than python has. I look forward to the day Python has a good hard look at itself.

In the meantime, if I need a backend for a website and I'm given the choice between PHP or Python, I'll choose PHP (symfony) every time.

Besides, PHP devs are cheaper.

view more: ‹ prev next ›