Re:Exercism – Level up your programming skills
by kod on Monday December 11, 2017 @07:48PM
(#15902186)
Yeah, no, not when your primary language still can't get lexical scope right, or distinguish between arrays and hashtables.
[ Parent
| on HN ]
Re:Exercism – Level up your programming skills
by Will_Parker on Monday December 11, 2017 @10:08PM
(#15902715)
The lack of distinction between array vs hashtable isn't a big deal. Array as a map from integers to items works fine in practice. Even speaking of algorithm performance, it's fine for the uses you have on a web server. (Any other use of PHP is clearly insane. :) )
You speak like someone who hasn't worked much in PHP. When you do, a lot of quirks and flaws really bother you and slow down during everyday tasks, but the ones you mentioned aren't they.
Re:Exercism – Level up your programming skills
by mcny on Tuesday December 12, 2017 @07:29PM
(#15910895)
> a lot of quirks and flaws really bother you and slow down during everyday tasks
Would you mind sharing a few that bother you? q
Re:Exercism – Level up your programming skills
by Aeolun on Wednesday December 13, 2017 @03:15AM
(#15912830)
The fact that `false` isn't always false. Or that '0' or 0 or null are all 'false'.
There's a bunch more quirks in Zend Framework that I use every day that are much worse than all the rest of PHP though.
Re:Exercism – Level up your programming skills
by mark-r on Monday December 11, 2017 @11:04PM
(#15902913)
It occurred to me not long ago that hash tables are a general solution to indexing, and arrays are simply an optimization that you can apply when the proper constraints are in place. I'm happy to discover that it wasn't an original thought.
Re:Exercism – Level up your programming skills
by nedt on Tuesday December 12, 2017 @05:27AM
(#15904400)
You can always use SPL for more strict datastructures (since 5.3): https://secure.php.net/manual/en/class.splfixedarray.php