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

A second component is that statics require const initializers, so for most of rust’s history if you wanted a non-trivial global it was either a lot of faffing about or using third party packages (lazy_static, once_cell).

Since 1.80 the vast majority of uses are a LazyLock away.





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

Search: