3 ms·
Not just that, but it also often does so efficiently and doesn't incur a runtime penalty (for new type and static predicates) and will reuse previous function d
by pyjarrett 4y ago
Not just that, but it also often does so efficiently and doesn't incur a runtime penalty (for new type and static predicates) and will reuse previous function definitions as well.
These are the sorts of cases with function parameters in various languages other language I've dealt with, in which this would have helped:
- "dt": delta time of what? Seconds, milliseconds, microseconds, nanoseconds, ticks? Usually, I'd expect seconds if it was a float, though I've seen counter-examples, and I usually have to trace back the flow to know for use if it's a 64-bit (u)int.
- "ip_addr" and "port": What's the type of port? If you guessed "int", you'd be right in part of the system. If you guessed "string" you'd be right in a different part of the system.
- "path": Does it matter if this is a relative or absolute path? It often isn't apparent this matters and then you find out this path is passed to a different system in which it does matter.
- skrtskrt 4y agoI just got done detangling various ip addrs, ports, and paths being passed from Go to C bindings. Not fun Rust having builtin IP address types (and libraries actually using them) is long overdue for mainstream programming languages