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

Swift (heavily used by Apple) has randomly ordered dictionaries for security:

> In particular, random seeding enables better protection against (accidental or deliberate) hash-flooding attacks

https://forums.swift.org/t/psa-the-stdlib-now-uses-randomly-...



Perhaps not unrelated to why Python is the #1 most popular language while Swift is #22 https://www.tiobe.com/tiobe-index/


Swift isn’t popular because its Dictionary type uses randomly ordered keys?


It certainly could be a reason among many. Just look at the thread GP shared, containing multiple years' worth of users voicing frustration at the introduction of this behavior.


Probably the inference is YAGNI .




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

Search: