5 ms·
How is that not magic? I suppose user code can do the same thing, but still, it's kind of magic. When people speak of magic in code, they mean something that
by hsn915 5y ago
How is that not magic?
I suppose user code can do the same thing, but still, it's kind of magic.
When people speak of magic in code, they mean something that looks innocent but has huge ramifications because some other part of the code (that you are not aware of) does special handling.
In this case, what looks like a simple variable declaration acts more like configuration, but it doesn't look like configuration.
It would be much less magical if instead the language required you to call something from main, for example:
fn main() {
std.setup_event_io();
....
}