On 7/31/2013 2:08 PM, Ehsan Akhgari wrote:
On 2013-07-31 1:41 PM, Joshua Cranmer 🐧 wrote:
With all of that stated, the questions I want to pose to the community
at large are as follows:
1. How much, and where, should we be using standard C++ library
functionality in Mozilla code?

I'm not sure if it's easy to have this discussion in general without talking about a specific standard library feature.

I'm most particularly referring to nsTArray, nsTHashtable and friends from the STL, as well as ns*String as Mozilla ADTs. In terms of all of the other code, I'm mostly referring to the large list of new APIs I provided in C++11 and C++14 as things we might want to use--std::chrono, std::thread and all of its friends, std::unique_ptr, std::function, std::tuple, and std::optional are the ones that look the most useful (std::function in particular could be superior to function pointers in our crappy EnumerateForwards-like methods). std::string_view, and the Filesystem and Networking draft TSs are also APIs (not yet finalized to any degree) that might influence potential changes we could make to our current non-IDL API regime.

3. How should we handle bridge support for standardized features not yet
universally-implemented?

I think MFBT has been working fine so far.

I should be more clear: I'm talking about library features, like type traits, that aren't available in the complete selection we have available. Since we generally haven't been working around incomplete library features (with the exception of std::atomic which is... touchy to say the least), we don't really have a good example of what an intermediate stage looks like. Basically, should we: a) Implement mozilla::Duration to polyfill std::chrono::duration until it is available everywhere, then mass switch. b) Implement mozilla::duration/mozilla::chrono::duration until available everywhere, then mass switch. c) Implement mozilla::std::chrono::duration until available everywhere, then mass switch. c) Implement std::chrono::duration until available everywhere, then delete our polyfill header.

--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to