Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

they are silent, not throwing exceptions when keys dont exist etc

I think this is a bad feature and causes bugs. In Python there's a fail fast feature, where it'll throw an error if you go past the end of an array. It's places like this were bugs creep in. In python, you find out that there's a problem with this array, in PHP you have to hunt around and only later look at the array X lines above where the bug manifests.

they are all hashtables so you can use them as both arrays and lists

Python dicts (i.e. hashtables) are better than PHP arrays. PHP arrays only have number or string keys, so you can't use arrays as a key in a PHP array. You can in python.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: