> Would this attribute not be a form of deprecation?
So far, I only encountered deprecation in the context of legacy functionality 
that will be removed later — but after taking a look in the dictionary, I think 
the word is actually a good fit (even if there are no plans to remove flatMap).

> Yes, the rename has a fix-it, but still: to the extent that these things 
> demand limited attention from the programmer, that attention should clearly 
> be focused on the latter set of problems.
I think there are worse warnings now:
Xcode suggests that a freshly declared var might be problematic, because you 
just did not have the time to write the code that changes it, that a let might 
be problematic because you can’t write the code to use that constant at the 
same time… I think this one here is rather helpful, as it educates you about a 
real (albeit small) error that can easily be avoided.

Even if filterMap is accepted, imho such a warning would be needed:
How should the same people that use flatMap wrong magically learn not to use 
filterMap all the time?
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to