Remix.run Logo
mdavid626 3 hours ago

If I have an “array” and can do array[0] to get first item, but when I filter this array and array[0] throws an error, that’s super weird. What is the meaning of [] or what is an array even? The language forces me to understand how it is implemented under the hood. That’s exactly what the author says: leaky abstraction.

mfonda 2 hours ago | parent [-]

An “array” in PHP is an ordered map.

pavel_lishin an hour ago | parent [-]

Isn't exactly their complaint? It's called an array, referred to consistently everywhere as an array, but it just ... isn't.