[rust-dev] tail-call performance issue?

2012-01-25 Thread Matthew O'Connor
Hi, I was reading https://github.com/mozilla/rust/wiki/Bikeshed-tailcall and wondered about the statement Tail calls cannot be implemented in general without a serious performance hit for all calls. I've never heard this before. tjc speculated it had to do with decrementing refcounts on normal

Re: [rust-dev] tail-call performance issue?

2012-01-25 Thread Patrick Walton
On 1/25/12 10:42 AM, Matthew O'Connor wrote: Hi, I was reading https://github.com/mozilla/rust/wiki/Bikeshed-tailcall and wondered about the statement Tail calls cannot be implemented in general without a serious performance hit for all calls. I've never heard this before. tjc speculated it had

[rust-dev] Proposal: rename sequence concatenation operator to ++

2012-01-25 Thread Marijn Haverbeke
Currently it is simply '+'. The thing that prompted this is issue #1520 -- operator overloading. Delegating + on non-builtin-numeric types to a `num` interface that implements methods add/sub/mult/div/rem/neg methods seems elegant, and similar to Haskell's approach. Vector-concatenation + messes

Re: [rust-dev] Proposal: rename sequence concatenation operator to ++

2012-01-25 Thread Patrick Walton
On 1/25/12 11:46 AM, Marijn Haverbeke wrote: Currently it is simply '+'. The thing that prompted this is issue #1520 -- operator overloading. Delegating + on non-builtin-numeric types to a `num` interface that implements methods add/sub/mult/div/rem/neg methods seems elegant, and similar to

Re: [rust-dev] Proposal: rename sequence concatenation operator to ++

2012-01-25 Thread Marijn Haverbeke
What about an add interface? That works, but doesn't provide the conceptual simplicity of a number interface, and if you want to write a generic over any numeric type, it could end up taking a T: add, mult, sub, div type parameter. ___ Rust-dev mailing

Re: [rust-dev] A couple of tweaks to make typeclasses easier?

2012-01-25 Thread Marijn Haverbeke
(1) Typeclass imports become import impl. So you'd write import impl driver::diagnostic::handler where you'd write import driver::diagnostic::handler today. This way, when you look at a method call and you don't know where it's coming from, you just grep for import impl and look at all the

Re: [rust-dev] Proposal: rename sequence concatenation operator to ++

2012-01-25 Thread Alex R.
There are cases in math or physics when the granularity is needed. For example, when implementing vectors (in the math or physics sense), it doesn't make sense to define a division operator, and what you mean by multiplication depends on if you mean dot product, cross product, or whatever. It'd

Re: [rust-dev] Cargo requirements

2012-01-25 Thread Graydon Hoare
On 24/01/2012 12:24 PM, Thomas Leonard wrote: Basically, I'd like to make a list of short-comings in existing installation systems that cargo addresses (e.g. poor documentation, too many dependencies, lack of robustness, poor security, etc). Summary version: too many concepts and moving

Re: [rust-dev] Proposal: rename sequence concatenation operator to ++

2012-01-25 Thread Niko Matsakis
On 1/25/12 12:18 PM, Marijn Haverbeke wrote: That works, but doesn't provide the conceptual simplicity of a number interface, and if you want to write a generic over any numeric type, it could end up taking aT: add, mult, sub, div type parameter. It seems to me that if impls did not have to