logoalt Hacker News

ameliaquiningtoday at 6:25 PM2 repliesview on HN

Rust doesn't have this behavior (sometimes called "life before main"). Code to initialize a static variable runs either at compile time, or lazily on first access, depending on which mechanism you use.


Replies

assbuttbuttasstoday at 9:00 PM

Interesting, thanks

saghmtoday at 7:22 PM

[dead]