220 37886 <CAFk2RUbmRs7E5wZ6xFKL7ehXc8pn3g9Hj-n8p=FcA1qU-QHeMw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: API versioning: functions: overload; classes:
 typedef; variables: <meep>
Date: Fri, 20 Apr 2018 10:44:44 +0300
Lines: 48
Approved: news@gmane.org
Message-ID: <CAFk2RUbmRs7E5wZ6xFKL7ehXc8pn3g9Hj-n8p=FcA1qU-QHeMw@mail.gmail.com>
References: <2e63ae60069efc0fb81610ac2bd35491@kdab.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1524210163 2347 195.159.176.226 (20 Apr 2018 07:42:43 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 20 Apr 2018 07:42:43 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRB3NU43LAKGQEUZL4AHQ@isocpp.org Fri Apr 20 09:42:39 2018
Return-path: <std-proposals+bncBC5JHI7A7ALRB3NU43LAKGQEUZL4AHQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ot0-f199.google.com ([74.125.82.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRB3NU43LAKGQEUZL4AHQ@isocpp.org>)
	id 1f9Qgl-0000SU-Nm
	for gclcip-std-proposals@m.gmane.org; Fri, 20 Apr 2018 09:42:35 +0200
Original-Received: by mail-ot0-f199.google.com with SMTP id a13-v6sf4616876oti.4
        for <gclcip-std-proposals@m.gmane.org>; Fri, 20 Apr 2018 00:44:46 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1524210286; cv=pass;
        d=google.com; s=arc-20160816;
        b=owuVQxPEECdXzBO4EzM4gHPr594qEqPsIpbEyHwNiPJIyBvEF9PnLqz0RZf9oy1S58
         m2clGf4bbBIgMt7qPEKS0x/7bxO2XtOJBJ0EmDoWonpPlcbkWk+YQMflW8TbstP2xJfL
         F0l46v9PJWMvVKXV9wsCJbUXYwk7s262fjlO6gqR4ULObVUyx9sIB9KefajA9hhVCHcI
         bBLmpoW6Tz3bB02EXFDNdAu1NVAVdXcxiBGPqkqSWHc0DlpjE+qmQEk8/eyMF5WO5+DA
         6Y1jHpMWPVmBGb6w5uTFv8d8w06LW7dhf8CmVLngEFnfJjjObe1po6ZLBEfpx4zNQHtL
         h8yA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=r77u57ULxRLayIHl3nZPRhGK7yEov6FvFDM2DoL6Bl8=;
        b=Qlga4GvP/MBkHfteydq2kzYXyD2c2EQBmOQmbapzALKGdsRjwx8D4unkm4zHXZr2Vd
         CTNaIGTc6tLXrHBaRtcf/CTD+5rd6idpy3pDiX9Eryr7lHTQc0qvTLfdH0poprjbbbxV
         2o28TBkozfquxCmiuJrBo/Pft7lcUthIUrwWKaSs+6OyWI51TkP9Jo2RSoCUYxH0n7Jt
         KjSLTQONLwwdY1H9p8886WHC4Y9w5gikLaByM9v78VlYIeD/u27EVZvxn6B/dcdK1bB3
         6EJCITVIto3K1MIxzJk+ZioJl5aBb27/k3fZFr9r+eWBQJMNzRPMQrLQE0gLZPy+EQ9e
         LV9w==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=jk16on6D;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=r77u57ULxRLayIHl3nZPRhGK7yEov6FvFDM2DoL6Bl8=;
        b=zxT/3g6jP9amTKO6XlPUiFTEeKlxOcY3BmU3Zp0IcagcikyjdWHooY/EmsRFH8E7FV
         nnGRAWgFm/d07jgHmxMJnYLGWKkWP6of0a9e0XSketr+4Mh7flj7fYTjQuU5p56J6sMJ
         4/tBvnELxTfkimz+8DmY++c695w2CqKY2K+rxTw80aoHIUvP+t/0Bm9Gtbzg8lmMEYwz
         UzYZ3x88VxLQm7Vh507MFJZXwo7RkbBkiJCJWrEqci8El631M18gq0mzo7NqbiC9P8TC
         67CUB+HrYOH/VeCtQhdGrVZFzfKkHFdZ8wlDojRAHUBBJG4zQgvIhQL4U/bJNWuXaiBs
         cRhg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=r77u57ULxRLayIHl3nZPRhGK7yEov6FvFDM2DoL6Bl8=;
        b=OaMfwVtXtgLhHJJU3EBVHWSRtggFoCc3BMf7+UaMu6Wz0YZ0zyhvZR+r7CG3Lr5KOY
         YQA4V9CkQbYXuMm8dcjKPoSnGj6ODfrtORHlOgaCBVp/hUqI+M9WXuwqlHu93Y0bG5Mm
         bc1Da3r+zyS/mk5qT4qiuP8zCRewEpEF+yiv/SA+jppQCFRqIsCB8AT5LWKtkaice4RC
         svaJjWOo3YsawWrsgib0pXXeNJyXOwZrO7In5IExz+2H6UssUMdDgcOs52Fiqmt0aLVz
         w8Sjo/w7DRSDmwWmBEr1KrWFt2ga13HMDDzshxCx6QCdMkYKJ5/SiaIqPOq15/voERys
         i9eA==
X-Gm-Message-State: ALQs6tDg9FEZ/HClcG8qUB6iGAgpZUWdngTKnYEyCFZGJbGTekYQjhoO
	SUJkw+mwB++vJ7Ka4N8IQNpIXA==
X-Google-Smtp-Source: AIpwx49xwLrqglgjISgZo9/37dBHNI8RDdb8F8ufMjzV3cHjbodA44Zo9p3yfapG7UjKYLhwtJz43w==
X-Received: by 2002:aca:f00b:: with SMTP id o11-v6mr2013570oih.98.1524210286375;
        Fri, 20 Apr 2018 00:44:46 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a9d:5223:: with SMTP id e35-v6ls5052954oth.13.gmail; Fri, 20
 Apr 2018 00:44:45 -0700 (PDT)
X-Received: by 2002:a9d:2e0a:: with SMTP id q10-v6mr4132848otb.393.1524210285173;
        Fri, 20 Apr 2018 00:44:45 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1524210285; cv=none;
        d=google.com; s=arc-20160816;
        b=qaKhOlQS1/K3OR8+wvHm18l95788hOJCmSeYFkyULlSPoO9gHSPw6PnznLzsHT0aOv
         t6qPyI9TqchnKNlKuWAi1F31PFuCU5JEZIEZfGR5JZv90g9YlEzQOU3QTPuIiL/TDbFo
         /RTg9883w4nLlQ0/fmH1YFpdIzTo+EVx3z2qnA3P87G21uSp2h7bhH94mc6X8GkucwsS
         wFh/oA5+5dv6ep3Q/NvXJItc8kfRUhavypYS7RvaZZawonQZbAuxtF/tYzexwOIyQSre
         u2tADeviOMg6Wpf/i+exC3f78qClxGXmdvjCUC3NP6MwerAX0OFrHSbZ7KYYY9bczaC6
         /KFQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=2SaLxeIqFr09JmQgiatAxn1+dDfrZ00jgGFAETwe6rE=;
        b=t6NVhqqHjhMuubnVGLLR9+jZHB/IgUbx2FZUMnMZyJleQa/QkluMQED42aJpeeRNGi
         aAoGzITUEyoYRDUlE/vBWJybhnFp59QYw6c2jqFuUZPr7cqgTD20jHpv6hh62FqrmpCZ
         cq7xZ5BCIO9JQapgyAxr9DGt+dLvYfl/SC4wFhjn92Orv2Y2Vug136knfeEaxOT+YYFU
         M5sEFGtT1e4fKz2n7AqcygPkbex48Jn2JjqREd4PZkifLBT+PQU1YmVZ/yYeWZ2paWD3
         9dZBnRAxEfuAvCsoGUdZaQgnfTSQfZnUptEeCqSkB5+U0yEYMJXwsY3W+AZz7ZopfYt0
         TnZA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=jk16on6D;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id z125-v6sor755133oiz.92.2018.04.20.00.44.45
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Fri, 20 Apr 2018 00:44:45 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a54:4015:: with SMTP id x21-v6mr5893259oie.312.1524210284813;
 Fri, 20 Apr 2018 00:44:44 -0700 (PDT)
Original-Received: by 2002:a9d:183a:0:0:0:0:0 with HTTP; Fri, 20 Apr 2018 00:44:44
 -0700 (PDT)
In-Reply-To: <2e63ae60069efc0fb81610ac2bd35491@kdab.com>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=jk16on6D;       spf=pass
 (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.41
 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:37886
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37886>

On 20 April 2018 at 10:40, Mutz, Marc <marc@kdab.com> wrote:
> Hi,
>
> This is an idea about API migration. Assume you have a public API, and you
> discover that you made a typo in an identifier (there are tons of other
> reasons to use the mechanisms that I'll show, but let's stay with typo for
> the sake of argument). How to fix?
>
> For functions, we can add a new function and deprecated the old:
>
>    // v1
>    bar make_bra();
>
>    // v2
>    [[deprecated("use make_bar()")]] bar make_bra() { return make_bar(); }
>    bar make_bar();
>
> For classes, we can use a typedef:
>
>    // v1
>    class bra { ~~~ };
>
>    // v2
>    class bar { ~~~ };
>    [[deprecated("use bar")]] using bra = bar;
>
> For variables, there's no way:
>
>     // v1
>     static inline bar my_bra; // oops! no source migration path :(
>
> I have two questions:
>
> 1. Is there anything in the pipeline that would address migrating variable
> names?
> 2. Assuming there's nothing, what about overloading the using keyword for
> this?


See http://open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0945r0.html
We're going to review it in Rapperswil.

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUbmRs7E5wZ6xFKL7ehXc8pn3g9Hj-n8p%3DFcA1qU-QHeMw%40mail.gmail.com.

.
