On 6/15/12 5:12 PM, Graydon Hoare wrote:
Yeah, I'm fine with that, it's just a different factoring; I was only responding to this parenthetical:

  "(and maybe not even that, if we use actual rusti intrinsics?)"

We can't get by with _just_ rusti intrinsics for things we need insight into for const-folding into read-only memory during compilation.

Yeah, there will have to be some constant-folding code that knows what the intrinsics mean. But it's *possible* (albeit rather unlikely?) that we could make it so that the *trans* code itself doesn't have to know. That is, it just "calls a fn" which happens to be an intrinsic. But the constant folding code might say "ah, it's the plus intrinsic, I know how to run *that* at compile time". Anyway, as I said, all hypothetical and not terribly relevant to the bigger question of the proper design for overloaded operator APIs.


Niko
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to