Earlier quoted context omitted.
Why save 10 minutes on setting up a proper database? Data is never teeny tiny, data is never not performance critical :) These decisions only bite you in the ass.
Setting up a database takes way longer than 10 minutes. Data can be teeny tiny. Data can not be performance critical. You literally know nothing about the commenter’s application.
PHP in 2022
291–300 of 318 posts
Re: PHP in 2022
#292Earlier quoted context omitted.
Have you seen ReScript and/or ReasonML? They are much nicer IHMO, but, yes, not as popular.
I've played with them quite a bit from the first time they were mentioned on HN. I really like OCaml. But the tooling and ergonomics are heavily in TypeScript's favor at this point, and at least for me, that makes a bit difference in day-to-day work. Anyway, my favorite of that variety of languages is PureScript. It's almost perfect.
Re: PHP in 2022
#293Earlier quoted context omitted.
Can't wait for: - Pattern matching in switch statements (done horribly wrong) - If, while, and switch expressions - Inferred type system - Consistent array method argument order - Actually usable higher order functions and reflection Big reminder: Php is a fractal of bad design, and I intensely hated using it at work for many years. The only good thing in Php is Symfony2 framework. https://eev.ee/blog/2012/04/09/php-…
Big reminder: Read beyond decade old articles. This is precisely the tired parroted line people in this post are talking about when they say they don't understand the modern hate.
- Pattern matching in switch statements
- If, while, and switch expressions
- Inferred type system
- Consistent array method argument order
- Actually usable higher order functions and reflection
?Re: PHP in 2022
#294Earlier quoted context omitted.
In its early years up until around 2006, PHP was mostly "HTML on steroids", that is, an HTML preprocessor with lots of goodies like "batteries-included" DB access, form handling, image processing, text processing, all accessed via a single Apache module. You simply rename your .html file to .php, and put some magic between " ". Then came along templating engines like Smarty, and they introduced a new templating langu…
That's exactly what has puzzled me for a long time: a language with HTML templating as unique selling point needs a templating "engine" after all? smarty.net has a pamphlet up there where pros/cons (but actually only pros) are discussed [1]. Failing to understand that " " syntax is a SGML processing instruction with well-defined ways to embed into a hosting markup language like HTML, they go even so far as to say > A…
Hack did this correctly with XHP templating. Unfortunately, Hack was killed by PHP7, and of all the features it took from Hack, context-aware native templating was not among them.
Re: PHP in 2022
#295Earlier quoted context omitted.
Laravel and Livewire is the best-kept secret ever because everybody is too busy being biased against PHP.
Php/Laravel/Livewire == Elixir/Phoenix/LiveView == C#/.NET/Blazor == Ruby/Rails/Hotwire/Turbo It's also slowly being integrated into JS frameworks although they're still behind as the focus has been clientside and static generation so far.
Feels like BE-first dev and non-SPA/JS centric client webdev is slowly regaining ground. Exciting.
Re: PHP in 2022
#296I'm just leaving my current role, a fast growing start up with a completely custom framework. Currently at half a million active accounts but there's really no bottleneck with the PHP. Can easily keep throwing more boxes and hardware at it and I feel pretty comfy that it will be fine at 20 million active accounts. Also background jobs processing which is sort of async cause it lives on top of SQS and fires a sub proc…
I congratulate you on your successful projects but I don't understand what you mean by "PHP is C-like and written in C so the hate is funny to me". The language of the runtime is not particularly relevant unless you want to write custom extensions (which I remember being an absolutely atrocious experience back when I had to do in in ~2007, hopefully it improved since then) and the language itself is only very superfi…
Re: PHP in 2022
#297I was a php developer for some time two years ago, before switching to go. I was mainly solving high performance parallel processing and distributed problems. There are things like ReactPHP which are an awesome achievement, but still every lib you use needs to be developed for ReactPHP. After learning about go and goroutines I only find it painful to solve these problems in PHP, even using ReactPHP.
Quoted post unavailable.
If you don't want to be banned, you're welcome to email hn@ycombinator.com and give us reason to believe that you'll follow the rules in the future. They're here: https://news.ycombinator.com/newsguidelines.html.
Re: PHP in 2022
#298Earlier quoted context omitted.
> why you’d consider yourself a “lowly” php developer. PHP has always been considered as a somehow bad language in all corporations I've worked at to date. The same applies to other script languages such as python, ruby or nodejs - but PHP was the most undervalued of them all. It's kinda strange because the language is really performant and relatively easy to use. Maybe that's exactly why the big brain architects don…
Let me preface this by saying that I pass zero judgment to any people who use PHP by choice or otherwise, and that I don't assume I'm "better" or smarter than anyone else for their programming tool choice. But, if you genuinely want to know why some of us hate on PHP, I can tell you the reasons that I would never choose PHP for a production backend (now, I do think PHP is a fantastic scripting/sysadmin language- bett…
Re: PHP in 2022
#299Earlier quoted context omitted.
You're perhaps joking, but victims of actual racism might not think that's funny.
I'm not joking and it's not supposed to bu funny. It's supposed to be confrontating. Example: Someone saw some bad PHP code once in their lives and think all PHP code is bad. They saw someone say bad things about PHP so they think all PHP is bad. Or they think PHP is bad because they don't like how it looks.
Re: PHP in 2022
#300Earlier quoted context omitted.
In a world where everything is fast becoming a JavaScript front end with “some” backend and with the improvements PHP has seen in recent years I don’t see why you’d consider yourself a “lowly” php developer. I’m mainly a C# guy myself as far as the backend goes, but I don’t view PHP as being bad in 2022. I think people who do are stuck in the past to be perfectly honest. It’s sort of like disliking JavaScript because…
> I think people who do are stuck in the past to be perfectly honest. I've recently tried to help out a friend who got stuck with a half-finished PHP project and a deadline to deliver, I have not touched PHP in 10 years and it still has the stench of a bad language from the get go - "modules" requiring VM config, "include" files ... what is this 90s ? PHP might have had a huge patchwork competent people did to keep t…
Also, any language that is used in real life is built on a foundation of sh*t only. The component loading with python is so bad that I have programs keeping their own version of python and IDE suggesting I create VM for my project. The situation with C is so bad that no one can solve my linker problems unless I switch the toolchain version. For a long time Javascript was a (purpose built) toy language to sprinkle pixie dust on web pages. Any sufficiently complex problem requires either deep knowledge or following convention (tribal knowledge specific to the context)