Re:My Experience as a Female CS Major
by JonnieCache on Monday May 02, 2011 @01:35PM
(#2507082)
Hmmmm. I feel I may be proving the OPs entire point rather too well with this line of enquiry. I don't think I've ever trolled myself before. How embarrassing.
This kind of thing is trickier in places like HN though, because a statement is only showing off to people who already have the knowledge. There are millions(?) of people reading here, so statistically most of them probably wont know some obscure piece of knowledge about the problems of the key hashing function under random access in numerical PHP arrays. It may be showing off to the couple of people actively engaged in the debate, but to everyone else its educational.
That's most of the reason I come here, to be honest. Crumbs of insight casually discarded during the debates of much cleverer people.
Fine, s/Python/JavaScript/ then. Nobody applauds JS for it but neither is it derided as PHP is for this reason.
The same people don't seem to bash Lua's tables.
A hashmap with mixed keys is hardly the most practical choice for an all purpose primitive data structure.
Python already has proper arrays where you might have some chance of fast sequential access. The ordered dict or whatever is just another tool in the box.
Basically, PHP makes you do shit like this: http://www.php.net/manual/en/function.is-array.php#102652