4 ms·
Every time I work in another language I miss PHP’s arrays.
by ceejayoz 5mo ago
Every time I work in another language I miss PHP’s arrays.
- rokkamokka 5mo agoThey are an incredibly versatile tool for sure. Even more so wrapped in a Laravel Collection
- spiderfarmer 5mo agoAbsolutely. If you don’t know PHP arrays aren’t actually arrays, the other languages feel inferior.
- bakugo 5mo agoFor me, it's the exact opposite. Every time I work with PHP, I wish I could have TypeScript's properly typed arrays and dictionaries instead of the janky untyped 2-in-1 mess it actually has.
- conceptme 5mo agoBasically every other language has the same functionality (or better) as a hashmap.
- ceejayoz 5mo agoI’m well aware of them. I’m not sure I agree with “better”.
- xp84 5mo agoI’m very curious to hear your take on this. I started out on PHP for about 4-5 years then moved on to Ruby and JS. I never once had any fond thoughts for PHP’s split-personality array thing. So I’m very curious what it is that other people appreciate about it.
- ceejayoz 5mo agoHaving to switch implementations and potentially functionality because, say, the order of the collection matters now is rather annoying, IMO.
- lazka 5mo agoThat array keys are auto-coerced to integers has bit me multiple times.