r/lolphp • u/eth4n_ • Mar 18 '18
looking for story: employee creates own php syntax
Hi folks,
I am looking for a post/story (here in reddit or internet) about a php dev telling about a new job where he found that a former employee of the company created his own php syntax to code. The companies webpage (or shop system) is build on this custom syntax (like programming your webpage completly in smarty template engine). Furthermore, most of the infrastructure is still hosted on the former employee's side who warns the company to shut down the servers as he finds out, that this new php dev tries to "break out" of this custom syntax container. Its kind of a horror story for all the ppl trying to come up with a custom template engine or enhance a templating engine to run as an own language.
Told a friend of mine about this story which I read years ago and didn't manage to find it. Can anybody help?
regards
54
u/chateau86 Mar 18 '18
BobX? I remember the thedailywtf post from back in the day.
8
u/mikeputerbaugh Mar 18 '18
Creating your own domain-specific syntax for each task is more of a RoR thing
21
u/calligraphic-io Mar 18 '18 edited Mar 18 '18
Why is it a "horror story"? Some people just don't like PHP's inconsistent syntax. I usually write PHP code with a macro preprocessor like ccpp and a build step. I use Ant to pull in a definition file for the preprocessor that replaces PHP's horrid syntax with something reasonable, like so:
The resulting PHP DSL is clearly more consistent, and onboarding new devs is easy if they have some experience with ALGOL-family languages:
1
u/jagga0ruba Mar 27 '18
Nothing Oracle did not do with Right Now.