Earlier quoted context omitted.
But genuine question -- what other languages are as simultaneously as useful AND predictable?
Python covers many of the same use cases and is much more consistent/predictable. TCL if you want to go back a bit further.
I still love PHP and JavaScript
181–190 of 402 posts
Re: I still love PHP and JavaScript
#182Re: I still love PHP and JavaScript
#183Earlier quoted context omitted.
This is just so far from the truth. I can just as easily push tons of logic down into templates in erb/jsp/jinja etc... at some point it boils down to the programmer's level of expertise, but also to the programmers' opinions as there are still a lot of varying opinions on what exactly are best practices.
> I can just as easily push tons of logic down into templates in erb/jsp/jinja etc... Not just as easy if they don't allow you to insert arbitrary code at arbitrary points as PHP does. Personally my preferred approach is Wicket where you can't have any logic in your markup at all, all of your logic lives in code and the only thing you can put in the template is IDs for where the code can insert child components or pl…
By using Wicket you are making a choice to opt in to a template system that encourages best practices. This is the same reason people in the PHP ecosystem opt in to Twig/Blade/Mustache, or how people on Ruby opt out of ERB for Slim or Haml.
Re: I still love PHP and JavaScript
#184Earlier quoted context omitted.
I would say security by default is a good reason to not have this. I've been burned too many times on PHP projects because someone miss-configured an httpd conf file.
From all the potential web security issues someone can have that one is probably the easiest and most likely you will get right.
Re: I still love PHP and JavaScript
#185Earlier quoted context omitted.
Python covers many of the same use cases and is much more consistent/predictable. TCL if you want to go back a bit further.
With Python one never knows when a particular feature code depends on will be removed. With PHP code written 15 years ago still works.
Re: I still love PHP and JavaScript
#186Of course, some people will cry "spaghetti code" but sometimes you just want to get work done.
Re: I still love PHP and JavaScript
#187Earlier quoted context omitted.
Not sure about "no surprises" - just saw this on Twitter yesterday: https://twitter.com/LupinityLabs/status/1554217944179249153
This is hardly specific to PHP. You should never compare IEEE floats using equality.
Re: I still love PHP and JavaScript
#188My favorite PHP feature: NO COMPILATION! Simply drop your new files and voilà - your SaaS is up to date and serving new code!
Re: I still love PHP and JavaScript
#189Earlier quoted context omitted.
> I can just as easily push tons of logic down into templates in erb/jsp/jinja etc... Not just as easy if they don't allow you to insert arbitrary code at arbitrary points as PHP does. Personally my preferred approach is Wicket where you can't have any logic in your markup at all, all of your logic lives in code and the only thing you can put in the template is IDs for where the code can insert child components or pl…
You seem to think that you refuted my argument, but instead you reinforced it. By using Wicket you are making a choice to opt in to a template system that encourages best practices. This is the same reason people in the PHP ecosystem opt in to Twig/Blade/Mustache, or how people on Ruby opt out of ERB for Slim or Haml.
Re: I still love PHP and JavaScript
#190Each PHP file is a magic hot swappable component. Not some bulky binary you have to full compile/deploy on every tiny change. What other web technology compares?