>> I’d love to see examples where using auto substantially hurts readability so >> we could debate them. I once saw a RefPtr<Something> changed to auto in some generated code where it was unclear what the return type was. For at least one generated instance the return type was Something* that needed a reference kept alive by the caller, so this change caused a subtle use-after-free bug. See https://trac.webkit.org/changeset/201345 <https://trac.webkit.org/changeset/201345>
Also when we change what a return type is but there are call sites that use auto, we may miss checking to see if everything is ok at a call site that compiles successfully even though it has different meaning. I’ll admit auto has grown on me quite a bit since I wrote https://lists.webkit.org/pipermail/webkit-dev/2014-January/026000.html <https://lists.webkit.org/pipermail/webkit-dev/2014-January/026000.html>
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev