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

It's not a bad thing itself to make "arrays" work like that, except, you can't call them arrays then.

For example, Lua uses a similar approach ("tables") and works just fine. AFAIK, it does certain optimizations under the hood to make sure numerically indexed tables behave efficiently (like arrays). Maybe PHP does the same thing, but its terminology is confusing.

P.S.: I dream of a future where Lua is the primary tool for web development. It's perfect for that purpose as a language, but unfortunately, lacks the necessary ecosystem :(



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

Search: