Marijn asked why we are not using STL in the runtime C++.

It's a good question. In Mozilla C++, we have avoided STL because we cannot 
take the code size and runtime costs of exceptions on all platforms.

https://bugzilla.mozilla.org/show_bug.cgi?id=200505

is worth a read if you are so inclined.

Once we gave up on STL for want of failure propagation via return value, we 
went in different directions on other, particular design points (raw buffer 
access, single-allocation hashtable [double hashing with entries as interior 
allocations]).

The high cost of exceptions with MSVC looks like it will endure, alas. Even 
with zero-cost exceptions in GCC, the RTTI hit was costly last time we checked 
(a while ago).

I hope this helps. I'm curious to hear from people who see a better way to go 
cross-platform with Rust's C++. It is 2011, after all!

/be

Begin forwarded message:

> From: marijnh 
> <reply+c-298321-7b71fdeec2c61135dded73560e2e38d81b9e0...@reply.github.com>
> Date: March 10, 2011 9:31:39 PM PST
> To: bren...@mozilla.org
> Subject: Re: [GitHub] Add basic file-system functionality [graydon/rust 
> 2330c96]
> 
> Yeah, that's a TODO. Is there a reason you're not using the STL anywhere in 
> the runtime code?
> 
> https://github.com/graydon/rust/commit/2330c96e4550d371d71822d4aa0baadba95a1253#commitcomment-298321

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to