4 ms·
> For performance sensitive code, you sometimes need to deliberately step out of the strongholds of the compiler. ...or just add more primitives to the languag
by lhgaghl 13y ago
> For performance sensitive code, you sometimes need to deliberately step out of the strongholds of the compiler.
...or just add more primitives to the language.
- dbaupp 13y agoWhy make the language larger when you can write identical things in libraries? (For Rust, you can use `unsafe` blocks to write very low-level primitives in normal user code and then expose a safe interface above them.)
- fzltrp 13y agoIt depends on what you guys are talking about. If you mean "constant" primitives, i.e. things which don't require to expand the language grammar or type system, then it's a question of future prevalence of usage of said primitives. If they become almost ubiquitous to any project, then they obviously need to be included in the standard libs. If you're talking about a new language feature, that depends on how much that new feature may help design and write future libraries, and also what are the aims of said language. I understand that rust aims to become a safer system language, so any feature helping the design of low level, performance critical code should be welcome.