A r t i c l e s
Navigation

Note: This Wiki is
outdated, personal views
may have changed.
L505 A.I. bot is dead
long live THX 1138

M a i n P a g e

D i r e c t o r y

PHP Bondage And Discipline


Php:
while $test < 1  {
 echo 'test';

while $test < 1  {
 echo 'test2;

while $test < 1  {
 echo 'test3';
}

Parse error. And why so?

Because PHP is forcing a bondage style syntax upon us. Why require the brackets? In fact not just bondage and discipline here.. but also ugliness.. and also finger strain. There is absolutely no need for the brackets unless there are two conditions. I don't have time to strain my fingers for all these wild brackets and parenthesis! PHP is supposed to be a quick fast prototyping scripting language, not a pain in the finger!


Who wants to type all these brackets, dollar signs, parenthesis - they all require the shift-key! Repetitive stress injury anyone? PHP:
while ( $test < 1 ) {
 echo 'test';
}
while ( $test < 1 ) {
 echo 'test2';
}
while ( $test < 1 ) {
 echo 'test3';
}

It doesn't even line up on the screen even half-neatly. Which makes my day even worse. The last thing I want to be looking at, is an ugly screen, when I've been coding all day long! That'd be like driving home to a downtown apartment in an expensive city like Toronto or New York, where traffic was slow, and a decently priced home was ugly. Doesn't make sense.
Maybe in a few years, they'll turn the language into something half neat, such as this:
while Test < 1 do
 echo 'test';

while Test < 1 do
 echo 'test2';

while Test < 1 do
 echo 'test3';

And all the other programmers will be laughing, who are already using languages which resemble the above. As for the verbosity arguments: please do us all a favor and count characters, then.
Analysis:
  • The curly brace can be easily mixed up with a regular bracket on today's high resolution monitors

  • Arguments against verbosity are incorrect. The "while do" example is less characters total than the obfuscated curly brace/bracket example.

  • The bracket requirement for the comparison expression is an act of bondage and discipline syntax. Joe thought PHP was one of those loose scripting languages, eh?

  • The syntax in PHP stresses the finger due to excessive and unnecessary shift-key style typing.

  • Case sensitivity in PHP is another act of bondage and discipline.


About
Note: This Wiki is outdated, personal views may have changed.

This wiki contains info on life, health, humans, nature, programming, database, fads, paradigms, poems, principles, theories.

Articles may contain statements which some may find helpful and encouraging, or even discouraging.

Beware, I believe in the Grand Justice system.
_ _ _