Show HN: I reinvented PHP in TypeScript (demo)
11–20 of 34 posts
Re: Show HN: I reinvented PHP in TypeScript (demo)
#12"No build steps, no preprocessors, no complex configs".
I worked on a project recently that followed this and Devs loved it. The DX was amazing.
Re: Show HN: I reinvented PHP in TypeScript (demo)
#13PHP is a templating languages designed to be so inadequate that you have to implement other templating languages in it. https://news.ycombinator.com/item?id=32961202 >PHP was already a templating language, but somebody got it in their head that there should be an iron-clad separation between designers and programmers, and that PHP gave designers too much power and confused them, and that their incompetent untrustwort…
Modern PHP is not a templating language. It can be, much like many other languages can be, but it's not how it is used. Most other languages also implement their own templating languages. Have you seen modern PHP ... I don't know, sometime in the last 10 or so years, or is this just another circle jerk of hating on something you have little clue about? Now if you see that as a bad thing, separating business logic and…
Modern PHP has the same capabilities as PHP 5 had, and more. There was nothing fundamental removed from the language that keeps it from being used as it was in PHP 5.
Re: Show HN: I reinvented PHP in TypeScript (demo)
#14My naive question: so if I have node, express, and JS tagged template literals. Is not that what PHP does. Route some url to a html interpolated with code. What is the add-on from this library? The only thing I read out of it, is some css and other templating benefits. Which is not the essence of PHP. The essence of PHP is that you mix html and code (which many JS tagged templates support). This goes more in the dire…
php has not been "mix html & code" for the last 10 years if you use it properly
Re: Show HN: I reinvented PHP in TypeScript (demo)
#15I think this misses one of the main selling points of PHP, the shared nothing, single thread, fire and forget methodology that I can throw behind a load balancer and spin up 100 servers.
Re: Show HN: I reinvented PHP in TypeScript (demo)
#16I think this misses one of the main selling points of PHP, the shared nothing, single thread, fire and forget methodology that I can throw behind a load balancer and spin up 100 servers.
You can probably use something like https://www.cgi-node.org/ to get close to the PHP model in the JS world. But, I wouldn't be surprised if its slower than PHP due to the overhead of starting up NodeJS for each request, as PHP has been optimised to have fast start times.
Re: Show HN: I reinvented PHP in TypeScript (demo)
#17PHP is a templating languages designed to be so inadequate that you have to implement other templating languages in it. https://news.ycombinator.com/item?id=32961202 >PHP was already a templating language, but somebody got it in their head that there should be an iron-clad separation between designers and programmers, and that PHP gave designers too much power and confused them, and that their incompetent untrustwort…
Separating out templates was already something one used to do back when Laravel added Blade back in 2010-2011 sometime, in one of the first iterations of the framework. It's not like they experienced pushback because of Blade.
Re: Show HN: I reinvented PHP in TypeScript (demo)
#18Re: Show HN: I reinvented PHP in TypeScript (demo)
#19Interesting pattern. This is specially nice to me: "No build steps, no preprocessors, no complex configs". I worked on a project recently that followed this and Devs loved it. The DX was amazing.