On Jan 11, 2014, at 3:50 PM, Darin Adler <da...@apple.com> wrote:

> 
> On Jan 11, 2014, at 3:36 PM, Maciej Stachowiak <m...@apple.com> wrote:
> 
>> 
>> Ideally it should be USE(THE_SPECIFIC_FRAMEWORK_IN_QUESTION). I would guess 
>> that much of PLATFORM(MAC) that is valid for both Mac and iOS should 
>> actually be USE(FOUNDATION). PLATFORM really shouldn't be used for things 
>> other than terminal platform names. USE(COCOA) would be an ok stopgap if 
>> sorting down to more specific conditionals delays this cleanup too much.
> 
> Sorting down to specific conditionals will definitely delay the cleanup too 
> much!
> 
> Thinking about USE(FOUNDATION) and looking at code it’s clear that the Mac 
> and iOS ports have a lot more in common than Foundation. I saw that looking 
> at PLATFORM(MAC) code snippets.

I saw that too after looking at more.

> But as long as we’re going to have something incorrect as a first 
> approximation, I don’t think that incorrect uses of USE(FOUNDATION) are 
> significantly worse than incorrect uses of USE(COCOA). If long term there is 
> not supposed to be such a thing as USE(COCOA), then I would hate to add it 
> and then have to remove it later.
> 
> It remains clear to me that a valuable and quick first step is to 
> mechanically change PLATFORM(MAC) to BAR, and I am OK with BAR being 
> USE(FOUNDATION), USE(COCOA), or PLATFORM(COCOA).
> 
> I am sure there is a lot of easy refinement we can do immediately after. For 
> example, we can change BAR && !PLATFORM(IOS) back to PLATFORM(MAC), if we 
> can’t find an even better conditional. Maybe our first step can even be 
> clever and not ever change such things to BAR, as suggested by Dan.
> 
> I’d like to play the numbers game, so if our best guess is that most 
> PLATFORM(MAC) should be USE(FOUNDATION), I would choose that for BAR.

After thinking about it a bit - USE(COCOA) (or for that matter even 
PLATFORM(COCOA)) might be better as a first cut. Since it's not supposed to 
exist at all long term, it makes for an easy number to drive to zero. 
USE(FOUNDATION) will mix both correct and incorrect uses so it will be harder 
to drive the mistaken applications to zero.

Regards,
Maciej

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to