[Development] Challenge: adding new method overloads when existing consumers use {} with args

Marc Mutz marc.mutz at qt.io
Thu Aug 4 09:11:49 CEST 2022


Hi,

On 28.07.22 22:54, Thiago Macieira wrote:

This case can be considered a Category B source incompatible change as per
https://quips-qt-io.herokuapp.com/quip-0006.html, because it clearly
introduces ambiguity.

But {} is particularly special, so I don't know how we'd deal with it. I don't
think this has come up for us yet. For one, the mailing list thread linked in
the QUIP didn't address it.



Sorry, I can't see {} as being special at all. It's essentially the same as taking the address of a function, which works if there's exactly one overload (or you implicitly or explicitly cast to the intended signature). Apart from subtleties such as QLabel({}), which we can't and don't want to rely on to compile, calling functions with {} also only works if there's exactly one overload (with fitting arity) (or you implicitly or explicitly cast to the intended type).

So, SiC Type A.

Thanks,
Marc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20220804/16020164/attachment.htm>


More information about the Development mailing list