220 36700 <CALvx3hZTtnCAQyToOHZLuhyt1g2RaNc+xkF5eCB7HSAtyuiq2g@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Richard Hodges <hodges.r@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Writing ease for methods in C++
Date: Thu, 18 Jan 2018 16:52:08 +0100
Lines: 133
Approved: news@gmane.org
Message-ID: <CALvx3hZTtnCAQyToOHZLuhyt1g2RaNc+xkF5eCB7HSAtyuiq2g@mail.gmail.com>
References: <b5eac9e3-8199-4eee-a273-0bbd7b4a6612@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="001a113fbfc6428e4305630ef25f"
X-Trace: blaine.gmane.org 1516290634 26685 195.159.176.226 (18 Jan 2018 15:50:34 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 18 Jan 2018 15:50:34 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD4PBM7UWAHRBKMFQPJQKGQEJSBUL6I@isocpp.org Thu Jan 18 16:50:30 2018
Return-path: <std-proposals+bncBD4PBM7UWAHRBKMFQPJQKGQEJSBUL6I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f197.google.com ([209.85.223.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBD4PBM7UWAHRBKMFQPJQKGQEJSBUL6I@isocpp.org>)
	id 1ecCS6-0005OX-RI
	for gclcip-std-proposals@m.gmane.org; Thu, 18 Jan 2018 16:50:07 +0100
Original-Received: by mail-io0-f197.google.com with SMTP id v2sf21579213iog.10
        for <gclcip-std-proposals@m.gmane.org>; Thu, 18 Jan 2018 07:52:10 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1516290730; cv=pass;
        d=google.com; s=arc-20160816;
        b=ltJHXB4Jz8RXrb1YZTM0Esl56jYWRodhK9NRd2EhXyNXNarojGYE1gF5KIjtOiFb6O
         C6r9PDYjCO8kEJtRiE3/KHrRlSxJNV8GyaS8JEEGfFQ1AI350fPy32LmEQdszkPCd/oa
         OhIeQQqGOFrxST0GRBgO3tavui5QviMasMhdAsrYNUrLa54IyFIoafTW5EfIiIAlGU9U
         aavuM6Ys3hcCmY761kpS++Bezz4K03nRQ1q17alx0BCLmaCQ3oRof1+Tihr15w5EjjEA
         3dt0KB54NLBKJa/jPlzMoSNWA7Xtty4Cw3/382rPgTFSOQko0adrPPIkymfOokMneN3y
         qU+Q==
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=RZk8A30+S+O/I35DZLe6OzJ24gmZJBcVKKyAsLq4cGE=;
        b=gHIjI9JkDTfXD3fSM4zMZfyK8MbR+gW9alVXPUe+s40vJQ7cHcPESqmEawIDQn7CPw
         p4sXFAGFDjoeQdH95nxmy8jWsXOn5URlGX0Vm8GNIPsGb6N73i/GBr/KOot58UgUvlh/
         fRkPS1wt/xS+JgHFLQRYjZKRUXbA4FrV1L13Dddk13uk2qz1WB7TjzIgIWwuXRRDyeFL
         6bbrSeRxHjA0tuGZ8j39Fu/GWz8wk865Tt5rhJjUl7zzq2KJ0k1D5oT+r0MhVKaMIF/9
         177H3u41wxxXIZjmA/En31tbI9+G62Um1/t8TaxsspKgazO0cUSgrLxAwXv4KlnIqOdW
         D1YQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=qDptFqTO;
       spf=pass (google.com: domain of hodges.r@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=hodges.r@gmail.com;
       dmarc=pass (p=NONE sp=NONE 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=RZk8A30+S+O/I35DZLe6OzJ24gmZJBcVKKyAsLq4cGE=;
        b=UC/W3c8TWPLM88/VVQMDdgYn7d4s0cNoGGcZXrDDA6FkdtEetH+ciIV1VWnQ4oMd8m
         Q2rufWMeTZB6jawsHlm8yY9+tBiLciWKk0rGCZ6iwt9oqRZfgiatMUitRrQJ4+54ZIom
         qRSAajqvtXozcxaTmiutnN/TidXHOF6MyKF51UGTKd6Eg5BMh0KLhB8piNlsEpHzaw45
         KMXzR/qmFr09O7dKEQITYjFwvUSYMkVnpjixpKdvqQ8oOBLnn06SPAjf8AInm/6B80n6
         BoW5robLvHjNnLSwq3qHVclUkgopyGKTWIUaV1if7fyXssEoQ2xi2uvnjwX3jLUAq85K
         GAhQ==
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=RZk8A30+S+O/I35DZLe6OzJ24gmZJBcVKKyAsLq4cGE=;
        b=BuvJHyT4WDrQMwGUfg/pNnG8YEjtJgoZXCqmOq+yQOTM412ymwWG04WOIMN8qsITKA
         G5md9PEBhbYJpl8GVvzlmXb75+HiG3ot9RvJINa4HGxwsrQMZS59Juu+Ua5nXT4udOIY
         i9ZiaaYHQMV7zDwL9Y+pRRytMOWwGnr24ZYsqLWwEm25Gno3qfcn3T69khPmqnAwQJIy
         497lG5npBUsL4U0GLsydZpJdDbfCE/2b309LiKeS/7tSseqjr8ddZy3uumdXdxc12QqO
         Ps3pKnG1VSIPsvq2CAoj8kDmxunJpR+LiYIgSgd0QNOnXt+CDZj3jNvglqgjA21bE15J
         ktzg==
X-Gm-Message-State: AKwxytfm5kzMo/2oNLhXLNWd8kbFKrOcIAcytdAILPCKvieLYD02/XIo
	vayuB5egAC7fk9isI+yVlA1Q3A==
X-Google-Smtp-Source: ACJfBou5kW1S+p7kFddre75kiHeRTLVm0K10w9ci2bc36SCRutH+TRiyl/N58tZirm/YnAVqC7SPEw==
X-Received: by 10.107.145.197 with SMTP id t188mr6209193iod.72.1516290730434;
        Thu, 18 Jan 2018 07:52:10 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.27.197 with SMTP id b188ls2179861iob.9.gmail; Thu, 18 Jan
 2018 07:52:09 -0800 (PST)
X-Received: by 10.107.142.2 with SMTP id q2mr14928687iod.21.1516290729125;
        Thu, 18 Jan 2018 07:52:09 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1516290729; cv=none;
        d=google.com; s=arc-20160816;
        b=NYjgz37l1pbEMNLwcv/HAP5dC+FjyFL4/YSoA3P/mxVRNwKzIzg49UKHCXIVUgTxkO
         RCxs6LcyjcegeinlgQIuof52pf+vIIahxxbY86pMMSZmnAYfr8aQzByJniWl//HSzFha
         OPRJrpSHKaM+tnaTxznqe5afu/hftJ6YdlAhKP/kZXDRSbsfaulDXZkeJhgBytIISyrL
         78rIQF4y0EZLhPCVRrBomzZPoDhFYceyLnH6lkm/6iG9xlNhgy9dujkGM/KUkCFzX8VK
         Mxti3RZNIBp/GnkTq7Z0GhlfdJ7QlG7DQzyK0uKWRt2mD27n0azF3n4QUndWhUY72gzU
         GCuw==
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=sxWzjnOReAFyS2ae6+TlHjjVvpU5mV2q0UNqLKqLbhA=;
        b=HKRuwHfTJ8JX1qAtvQAZvx8R9iDZPRnyjRjBuA57sIT/fRFQyjxqZ3X+1qxGw7lJ58
         64B1i0QLYZoVFF9KGqleqj33QygMmBMtVfFN2a5/FVw67wJFUctszDmb63+mx3E7sjo3
         Q9aiU+/yvWjMXpbS9su3qm32oIXE5HZFDnC4AWbJVS/vXJHraAAUSH63MNYUMHLLUc+t
         4AtrSIhWU0M9nxpXBq/52paN66vLT6EgD7IInDmjRLFPO1QjtSKDRQyfjepG55g3sGvl
         01G8DEHRkFsuKHWCFdN0sd+0WNsfCsgG75QdC5OagMGqpDhPTxDpLL9GsrrbjGxrUwlv
         CHXg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=qDptFqTO;
       spf=pass (google.com: domain of hodges.r@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=hodges.r@gmail.com;
       dmarc=pass (p=NONE sp=NONE 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 f28sor3537313ioi.171.2018.01.18.07.52.09
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Thu, 18 Jan 2018 07:52:09 -0800 (PST)
Received-SPF: pass (google.com: domain of hodges.r@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.107.135.208 with SMTP id r77mr26756247ioi.248.1516290728691;
 Thu, 18 Jan 2018 07:52:08 -0800 (PST)
Original-Received: by 10.2.126.75 with HTTP; Thu, 18 Jan 2018 07:52:08 -0800 (PST)
In-Reply-To: <b5eac9e3-8199-4eee-a273-0bbd7b4a6612@isocpp.org>
X-Original-Sender: hodges.r@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=qDptFqTO;       spf=pass
 (google.com: domain of hodges.r@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=hodges.r@gmail.com;       dmarc=pass (p=NONE
 sp=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-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:36700
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36700>

--001a113fbfc6428e4305630ef25f
Content-Type: text/plain; charset="UTF-8"

Suggest you have a look at objective-c, which does pretty much this (with a
small syntax difference). Objective-C is universally loathed for exactly
this reason.




On 18 January 2018 at 16:11, <meoelknot@gmail.com> wrote:

> Hi,
>
> I'd like to propose an improvement in method writing for c++.
> What about being able to continue the name of a function after the end of
> the parenthesis to do things like:
> - put(data)inVector
> - print(text)inFile
> - is(myClass)aGraphNode
>
> Perhaps also doing things like this:
> - read(myArticle)withEncoding(encoding)
> - add(5)toVar(x)
> - put(myInt)inVector(myVector)
> - place(myObject)atCoordinates(x,y)onlyIf(myObject->canMove())
>
>
> The declaration would be:
> - void put(int d)inVector  { ... }
> - void print(string t)inFile { ... }
>
> - void read(const Article& art)withEncoding(const Encoding& enc) {...}
> - void place(Object& o)atCoordinates(int x, int y)onlyIf(boolean b) { .. }
>
> It could be totally optional and ease the writing/reading of some
> functions that aren't easy to write in a programming language.
> This way, reading our code could be slightly more intuitive.
> We could give more informations about the parameters of our methods.
> I don't think it would be hard to process by a compiler, it could change
> the method name to "placeatCoordinateonlyIf(Object& o, int x, int y,
> boolean b)"
>
> Thanks for reading and for any remarks
>
> --
> 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/b5eac9e3-8199-4eee-
> a273-0bbd7b4a6612%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b5eac9e3-8199-4eee-a273-0bbd7b4a6612%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CALvx3hZTtnCAQyToOHZLuhyt1g2RaNc%2BxkF5eCB7HSAtyuiq2g%40mail.gmail.com.

--001a113fbfc6428e4305630ef25f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Suggest you have a look at objective-c, which does pretty =
much this (with a small syntax difference). Objective-C is universally loat=
hed for exactly this reason.<div><br><div><br></div><div><br></div></div></=
div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On 18 January=
 2018 at 16:11,  <span dir=3D"ltr">&lt;<a href=3D"mailto:meoelknot@gmail.co=
m" target=3D"_blank">meoelknot@gmail.com</a>&gt;</span> wrote:<br><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex"><div dir=3D"ltr">Hi, <br><br>I&#39;d like to propose =
an improvement in method writing for c++.<br>What about being able to conti=
nue the name of a function after the end of the parenthesis to do things li=
ke:<br>- put(data)inVector<br>- print(text)inFile<br>- is(myClass)aGraphNod=
e<br><br>Perhaps also doing things like this:<br>- read(myArticle)withEncod=
ing(<wbr>encoding)<br>- add(5)toVar(x)<br>- put(myInt)inVector(myVector)<br=
>- place(myObject)atCoordinates(<wbr>x,y)onlyIf(myObject-&gt;canMove()<wbr>=
)<br><br><br>The declaration would be:<br>- void put(int d)inVector=C2=A0 {=
 ... }<br>- void print(string t)inFile { ... }<br><br>- void read(const Art=
icle&amp; art)withEncoding(const Encoding&amp; enc) {...}<br>- void place(O=
bject&amp; o)atCoordinates(int x, int y)onlyIf(boolean b) { .. }<br><br>It
 could be totally optional and ease the writing/reading of some=20
functions that aren&#39;t easy to write in a programming language. <br>This=
 way, reading our code could be slightly more intuitive.<br>We could give m=
ore informations about the parameters of our methods.<br>I
 don&#39;t think it would be hard to process by a compiler, it could change=
=20
the method name to &quot;placeatCoordinateonlyIf(<wbr>Object&amp; o, int x,=
 int y,
 boolean b)&quot;<br><br>Thanks for reading and for any remarks<span class=
=3D"HOEnZb"><font color=3D"#888888"><br></font></span></div><span class=3D"=
HOEnZb"><font color=3D"#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/b5eac9e3-8199-4eee-a273-0bbd7b4a6612%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/b5ea=
c9e3-8199-4eee-<wbr>a273-0bbd7b4a6612%40isocpp.org</a><wbr>.<br>
</font></span></blockquote></div><br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CALvx3hZTtnCAQyToOHZLuhyt1g2RaNc%2Bxk=
F5eCB7HSAtyuiq2g%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hZTtnCAQy=
ToOHZLuhyt1g2RaNc%2BxkF5eCB7HSAtyuiq2g%40mail.gmail.com</a>.<br />

--001a113fbfc6428e4305630ef25f--

.
