220 36699 <b5eac9e3-8199-4eee-a273-0bbd7b4a6612@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: meoelknot@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Writing ease for methods in C++
Date: Thu, 18 Jan 2018 07:11:22 -0800 (PST)
Lines: 91
Approved: news@gmane.org
Message-ID: <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/mixed; 
	boundary="----=_Part_2719_525214461.1516288282492"
X-Trace: blaine.gmane.org 1516288187 19021 195.159.176.226 (18 Jan 2018 15:09:47 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 18 Jan 2018 15:09:47 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCC3XFWM7EFBBG7SQLJQKGQEKU54XMI@isocpp.org Thu Jan 18 16:09:43 2018
Return-path: <std-proposals+bncBCC3XFWM7EFBBG7SQLJQKGQEKU54XMI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f72.google.com ([209.85.213.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCC3XFWM7EFBBG7SQLJQKGQEKU54XMI@isocpp.org>)
	id 1ecBof-0003Tu-B4
	for gclcip-std-proposals@m.gmane.org; Thu, 18 Jan 2018 16:09:21 +0100
Original-Received: by mail-vk0-f72.google.com with SMTP id 14sf2921675vke.8
        for <gclcip-std-proposals@m.gmane.org>; Thu, 18 Jan 2018 07:11:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=KilbCh524PBb/rGgKhn4Mi8QfoXWO0T881LGPVFEvk4=;
        b=RZN0yG2fe6qbrT+MXI/c4fDAhIMM0KBz8vT9zSOkeYZz1GN1e9ztJhaFvoYIpGxAZZ
         DTaxYbyYgOHkjm0tcASOkf7EG1jYRlxC3MFfdaM9oVYSx2rBtD5dhdV7ojXlil1UUAsV
         ulnFu9kF8nMpx6Xxgc7na91KBqPdFcCyBTHUKomPv/n3SLAyQRTO7yfEqpPoUG+dtBE8
         1LoGo7VTp/4xwv/UwfCWgj82mS7raxuXRsY0vxzbtllqwa3ytAciNnHG1sUNnEuMdCEk
         raXMugeCpkoaITk0+PyXpAXLV0Hbc79LzTviAcunHGQYBcMqdK5/yu/BDuDR6TfAN7wr
         W5ew==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=KilbCh524PBb/rGgKhn4Mi8QfoXWO0T881LGPVFEvk4=;
        b=H26TSvvQqJlUDIjHhcoBh7WVv2OGQ50EFNJDr05wI+Vg74+fyYSZOLYkJmudPU5Jkv
         5lPXqcxBLWf2RrRElstWDstpPLgFJDdSQx1Q7sgCtFr9JkAczaRXP3ATw1KTfsVXzXAp
         gg+Y9EzA7fyyMCgoE16NrfSsrOzTCH98bZ0IUl0FgI0fYDc+TQTiOMCnACY9ZbG46CLn
         IG75xljefyNt8KUPNyO5dLM9iW5enp8C/2PlV+FaapHwHdPqKgnLiSRnyyw6gpC7DA6h
         s1nlQ2vP6DsEcZDCW77N+cLkcOFYgY3FvQ8R0SFy/vCEt70HvznHaOW6qzEPqkPa4yA9
         hEGQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=KilbCh524PBb/rGgKhn4Mi8QfoXWO0T881LGPVFEvk4=;
        b=kYUg4J5rniDnLfieZf8sSlRtEIO1d9PrsJ+Q6BDvhNtbAKMTrNzJIppi+9KcxIMkev
         ZHbm25nfAhAANukHEQZbgsZbvzsIPpcOFZG/b53iamteyiKDEqz+JXBs9zLP7DJxGZvN
         ylYGE/xTFX1+b1NCLvCuk3RlvTq5LarObQGoFcC2VS91SgrNaTu4dxFCxZAC+1Wuuo/+
         FRjAdLBHlJzEifAGav7j0DxSk/gWaPHlYbAASNa9nMPRnu8JsHruEBB1iWPkh0UlYyOu
         HtjmAmvMndAG4DZuycirDbPj3UgXEApPi7wJg037IaGnmNLPZpysjm098pGJBC0Cf5Fg
         JhmQ==
X-Gm-Message-State: AKwxytdKu/peVPNhJNXwpItYR/0KCJSTMgAu+lAbscQKFZV9OBlw4oy+
	ahY3/Q7ELt2TOr01LOcqBffqvw==
X-Google-Smtp-Source: ACJfBovwp59PyjmeJYpQvgAtUO0e5iQeYSvw2ne1PWDPlSlJRk+BSG3O0FzQnBjj+cJtHJ7DqNgO1g==
X-Received: by 10.31.94.133 with SMTP id s127mr3324455vkb.85.1516288285095;
        Thu, 18 Jan 2018 07:11:25 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.176.27.13 with SMTP id d13ls2925508uai.11.gmail; Thu, 18 Jan
 2018 07:11:23 -0800 (PST)
X-Received: by 10.31.147.5 with SMTP id v5mr536438vkd.5.1516288282848;
        Thu, 18 Jan 2018 07:11:22 -0800 (PST)
X-Original-Sender: MeoElknot@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:36699
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36699>

------=_Part_2719_525214461.1516288282492
Content-Type: multipart/alternative; 
	boundary="----=_Part_2720_635498986.1516288282492"

------=_Part_2720_635498986.1516288282492
Content-Type: text/plain; charset="UTF-8"

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.

------=_Part_2720_635498986.1516288282492
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi, <br><br>I&#39;d like to propose an improvement in meth=
od writing for c++.<br>What about being able to continue the name of a func=
tion after the end of the parenthesis to do things like:<br>- put(data)inVe=
ctor<br>- print(text)inFile<br>- is(myClass)aGraphNode<br><br>Perhaps also =
doing things like this:<br>- read(myArticle)withEncoding(encoding)<br>- add=
(5)toVar(x)<br>- put(myInt)inVector(myVector)<br>- place(myObject)atCoordin=
ates(x,y)onlyIf(myObject-&gt;canMove())<br><br><br>The declaration would be=
:<br>- void put(int d)inVector=C2=A0 { ... }<br>- void print(string t)inFil=
e { ... }<br><br>- void read(const Article&amp; art)withEncoding(const Enco=
ding&amp; enc) {...}<br>- void place(Object&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(Object&amp; o, int x, int =
y,
 boolean b)&quot;<br><br>Thanks for reading and for any remarks<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/b5eac9e3-8199-4eee-a273-0bbd7b4a6612%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b5eac9e3-8199-4eee-a273-0bbd7b4a6612=
%40isocpp.org</a>.<br />

------=_Part_2720_635498986.1516288282492--

------=_Part_2719_525214461.1516288282492--

.
