220 8995 <CAFk2RUajniLTDFsd9u3sWo86aLqaRhAMGQdG7jOdv1CmbFasew@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: About implicit binary operator and user defined
 operators (was n3553 - Swap operator proposal)
Date: Sun, 2 Feb 2014 15:55:35 +0200
Lines: 41
Approved: news@gmane.org
Message-ID: <CAFk2RUajniLTDFsd9u3sWo86aLqaRhAMGQdG7jOdv1CmbFasew@mail.gmail.com>
References: <52EE4A48.9010006@wanadoo.fr>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1391349330 14841 80.91.229.3 (2 Feb 2014 13:55:30 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 2 Feb 2014 13:55:30 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBV44XGLQKGQE6NW3Q7A@isocpp.org Sun Feb 02 14:55:37 2014
Return-path: <std-proposals+bncBC5JHI7A7ALRBV44XGLQKGQE6NW3Q7A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f199.google.com ([209.85.214.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBV44XGLQKGQE6NW3Q7A@isocpp.org>)
	id 1W9xWL-0005kL-9e
	for gclcip-std-proposals@m.gmane.org; Sun, 02 Feb 2014 14:55:37 +0100
Original-Received: by mail-ob0-f199.google.com with SMTP id vb8sf24026061obc.2
        for <gclcip-std-proposals@m.gmane.org>; Sun, 02 Feb 2014 05:55:36 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from: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:content-type;
        bh=Mv69qcVs0BjIqmlrnxT6brq/MuUM3CcOzItTyMPoQ9Q=;
        b=GW04GYdEzmpIeGh4IHWSfqvZjkmcel9D+4cdDf7Vd5naBfd4PX8MIc/LPEqqS5b68T
         drlwKBfuXB0UW45aXjYpPfhKvtMD/9B6tqrLtKDBQYcfvhwmh50FJqaen6O+ZyvqYWo1
         L7SgYRNIRWuiq3bsD44jZKlzzebNithxiggXA26DB8EMBfW4/NVsiHWF0tyvSNDNIhyZ
         cw5jcAo3bQPE7fWZbK2Ajn9KKVPYd09xoKcHk5ZDAKw058T+rpLCuUV4Fi2naGjixj67
         myeikTrZ4WJqkLsPgYWiO/KDAx8VYssfEDouV5Ov7aXJ2Di8TQ9T+esoNLJCzzMnNrzp
         pCOA==
X-Gm-Message-State: ALoCoQkj852qQfRc0nyTnOFhBKb3ORKR2btcZuSFCKSJju6zNfe83dsC9jS10o16JtyBkY89GM8N
X-Received: by 10.182.246.39 with SMTP id xt7mr233167obc.40.1391349336103;
        Sun, 02 Feb 2014 05:55:36 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.91.110 with SMTP id y101ls1610749qgd.0.gmail; Sun, 02 Feb
 2014 05:55:35 -0800 (PST)
X-Received: by 10.224.124.133 with SMTP id u5mr48081865qar.79.1391349335190;
        Sun, 02 Feb 2014 05:55:35 -0800 (PST)
Original-Received: from mail-qa0-x22f.google.com (mail-qa0-x22f.google.com [2607:f8b0:400d:c00::22f])
        by mx.google.com with ESMTPS id c6si12604259qad.169.2014.02.02.05.55.35
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 02 Feb 2014 05:55:35 -0800 (PST)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400d:c00::22f as permitted sender) client-ip=2607:f8b0:400d:c00::22f;
Original-Received: by mail-qa0-f47.google.com with SMTP id j5so8756425qaq.34
        for <std-proposals@isocpp.org>; Sun, 02 Feb 2014 05:55:35 -0800 (PST)
X-Received: by 10.140.84.19 with SMTP id k19mr45366028qgd.98.1391349335077;
 Sun, 02 Feb 2014 05:55:35 -0800 (PST)
Original-Received: by 10.224.49.65 with HTTP; Sun, 2 Feb 2014 05:55:35 -0800 (PST)
In-Reply-To: <52EE4A48.9010006@wanadoo.fr>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ville.voutilainen@gmail.com designates 2607:f8b0:400d:c00::22f as
 permitted sender) smtp.mail=ville.voutilainen@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE 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-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8995
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8995>

On 2 February 2014 15:38, Vicente J. Botet Escriba
<vicente.botet@wanadoo.fr> wrote:
> Haskell interpret any 'name' as a binary left associative operator, e.g.
>
>     a 'swap' b;
>
> could mean
>
>     swap(a,b);
>
> Maybe ':' would be more appropriated for C++.
>
>     a :swap: b;
>
> An orthogonal feature could be to be able to define a user operator operator
> :symbols:() (note the symbols are surrounded by two colons) that could allow
> to define
>
>     A& operator:=:(A&x,A&y);
>     A& operator:><:(A&x,A&y);
>
> and use it as
>
>     a :=: b;
>     a :><: b;
>
> What are the pitfalls of such approaches?


Operator overloading is supposed to make code more readable. I fail
to see how that would be achieved by a :><: b;, and I don't see
how a 'swap' b; is any more readable than swap(a, b);

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
