WalaWiki content from p1k3.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

76 lines
2.6 KiB

WareLogging, IdeaLogging.
= hate =
* The culture.
** Boolean flags to functions.
** Detailed and highly inaccurate in-source comments about who added what and when.
** Code reuse should not mean ctrl-c, ctrl-v.
** Whitespace. How hard can this be?
* God, I miss Perl quoting, regex syntax, and POD.
* preg_*
* min(), max()
* [http://us2.php.net/manual/en/language.types.string.php#language.types.string.parsing String parsing], [http://us.php.net/manual/en/language.types.string.php#language.types.string.conversion String conversion to numbers].
* global
* case-insensitive function names
* Constants
* include
* Would it have been so hard to pick either of C++-like or Perl-like comment markers?
* rename() is essentially mv.
* Comparison operators. ===? Are you fucking kidding me?
** Ok, scratch this. It's not the operators, per se. It's the finicky, brittle, poorly abstracted type system that really drives me to fits of spittle-flecked rage.
** As an addendum, if this hasn't bitten you, either you haven't done much with the language or you just don't know how badly you're being been bitten yet.
* <? ?>
I used to miss having switch statements around in Perl. Now I'm fairly convinced they're one of the most ill-advised constructs you can make available to a vigorous amateur.
Why I hate PHP, in a nutshell:
brennen@hyperion 12:06:16 ~ $ php -r
function fuck () {
print fuck;
}
FUCK();
''^d''
fuck
brennen@hyperion 12:06:41 ~ $
= don't so much hate =
* At least it has function prototypes.
* It's pretty painless, syntax-wise, to build a multidimensional array.
* file(), at least when it works.
*
* They finally got around to adding closures. It's flat-out amazing what this does for the language.
= am somewhat bemused by =
* if (! function_exists('func')) { function func () { } }
* [http://php.net/ob_start ob_start()], ob_get_contents(), ob_end_clean() - output buffering.
= whack idioms i have seen =
$foo = array('something', 'some other thing');
foreach ($foo as $bar) {
switch($bar) {
case 'something':
# do a whole shit-ton of stuff
break;
case 'some other thing':
# do a shit-ton of other stuff
break;
}
}
= perl to php =
* chomp(), chop() -> [http://us.php.net/rtrim rtrim]
* shift() -> array_shift()
= other =
* http://www.steike.com/code/php-closures/
* http://pear.php.net/package/MDB2
As annoying as one-package-one-file can occasionally be in the Perl universe, I suddenly find that it is really nice to have a predictable directory structure emerge naturally from the hierarchy of modules/classes.