149 - Sugar that syntax
How To Code Well - En podkast av Peter Fisher - Fredager
Kategorier:
How to support Ukraine https://supportukrainenow.org/ Change log I’m working back in the land of legacy. PHP 5.6 Goose (My 2nd English Springer Spaniel) is now 9 weeks old and has razor teeth. I’ve been working on using Vagrant, Docker, Parallels and Ansible to create a test lab for HTCW We reviewed the documentation for tutorial 5 and 6 of the PHP login course on Tuesdays live coding stream I am talking at PHP North West Drupal User Group NWDUG next Tuesday at 7PM so I won’t be streaming on YouTube on Tuesday What is Syntax Sugar This is a term used to describe code that is meant to be more readable and helpful to humans. It’s sometimes called Candygramming Can shorten code to one liners which can be helpful and easier to read Can be difficult to change and maintain in the future Can lead to hidden magic features that are used in the language eg _get and _set Is sometime perceived as a lazy way to write code Reduces the syntax needed to perform an operation If done badly then it can lead to over complication, bad abstraction and even worse code readability then before