Re: [webkit-dev] WTF and STL

2015-06-23 Thread Darin Adler
> On Jun 23, 2015, at 1:40 AM, youenn fablet  wrote:
> 
> Vector

Many features in WTF::Vector are critical to performance, such as inline 
capacity, the specifics of its growth strategy, functions to preallocate at a 
particular size, and to trim once allocated. Some might have equivalents in the 
standard library but not all. It’s unlikely we could switch to std::vector.

> Deque

As with WTF::Vector, it’s likely that there are memory use and performance 
features that would make it a challenge to switch from WTF::Deque to 
std::deque, but could investigate this.

> Optional

We would like to switch from WTF::Optional to std::optional once it’s available 
on the platforms WebKit supports. But note that std::optional was removed from 
C++14; that’s one reason it’s probably not available everywhere yet.

— Darin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] WTF and STL

2015-06-23 Thread youenn fablet
Hi all,

STL classes such as std::function, std::unique_ptr are being used nowadays
in WebKit. The STL has some advantages, such as better documentation, being
familiar to non-WebKit developers...

I am wondering whether we should and could use more of the STL.
For instance, constructs that I know of such as Vector, Deque, Optional
have close counterparts in the STL.

Is there a way to keep all benefits brought by WTF constructs but using
their STL counterparts? Are there WTF constructs that can be replaced
directly by STL ones? Should we try it?

Also any thoughts on current WTF benefit compared to STL?

Thanks
y
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev