Topic: Writing ease for methods in C++
Author: meoelknot@gmail.com
Date: Thu, 18 Jan 2018 07:11:22 -0800 (PST)
Raw View
------=_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'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->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& art)withEncoding(const Enco=
ding& enc) {...}<br>- void place(Object& 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'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't think it would be hard to process by a compiler, it could change=
=20
the method name to "placeatCoordinateonlyIf(Object& o, int x, int =
y,
boolean b)"<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" 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--
.
Author: Richard Hodges <hodges.r@gmail.com>
Date: Thu, 18 Jan 2018 16:52:08 +0100
Raw View
--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"><<a href=3D"mailto:meoelknot@gmail.co=
m" target=3D"_blank">meoelknot@gmail.com</a>></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'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->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& art)withEncoding(const Encoding& enc) {...}<br>- void place(O=
bject& 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'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't think it would be hard to process by a compiler, it could change=
=20
the method name to "placeatCoordinateonlyIf(<wbr>Object& o, int x,=
int y,
boolean b)"<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" 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&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" 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--
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Thu, 18 Jan 2018 08:03:11 -0800 (PST)
Raw View
------=_Part_3022_1314975818.1516291391484
Content-Type: multipart/alternative;
boundary="----=_Part_3023_1659336396.1516291391484"
------=_Part_3023_1659336396.1516291391484
Content-Type: text/plain; charset="UTF-8"
What's the point of writing them that way if you can't* call* them that
way? It's making a promise with your declaration that the language can't
deliver on. It's good to have a function declaration syntax that generally
uses the same order as the function call syntax.
And even if that weren't the case, this just looks hideous.
--
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/4ccf0140-0086-47cb-8322-a4d4a79a12de%40isocpp.org.
------=_Part_3023_1659336396.1516291391484
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>What's the point of writing them that way if you =
can't<i> call</i> them that way? It's making a promise with your de=
claration that the language can't deliver on. It's good to have a f=
unction declaration syntax that generally uses the same order as the functi=
on call syntax.</div><div><br></div><div>And even if that weren't the c=
ase, this just looks hideous.<br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/4ccf0140-0086-47cb-8322-a4d4a79a12de%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4ccf0140-0086-47cb-8322-a4d4a79a12de=
%40isocpp.org</a>.<br />
------=_Part_3023_1659336396.1516291391484--
------=_Part_3022_1314975818.1516291391484--
.
Author: florian.csdt@gmail.com
Date: Thu, 18 Jan 2018 08:09:01 -0800 (PST)
Raw View
------=_Part_3069_1846109664.1516291741523
Content-Type: multipart/alternative;
boundary="----=_Part_3070_1861449361.1516291741524"
------=_Part_3070_1861449361.1516291741524
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
If you *really* want to do something like that, it is already possible by=
=20
returning an object with a method that actually do the computation.
But this is not something I would write nor recommend to write.
You would use such a function like this:
add(5).with(8);
To implement add, you could write this:
auto add(float i) {
struct {
float _i;
float with(float j) {
return _i + j;
}
} R{i};
return R;
}
Le jeudi 18 janvier 2018 16:11:22 UTC+1, meoe...@gmail.com a =C3=A9crit :
>
> Hi,=20
>
> 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=
=20
> 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=20
> functions that aren't easy to write in a programming language.=20
> 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=
=20
> the method name to "placeatCoordinateonlyIf(Object& o, int x, int y,=20
> boolean b)"
>
> Thanks for reading and for any remarks
>
--=20
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 e=
mail 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/586a1ba6-3f2e-4e8c-a7c1-8053d6b1491f%40isocpp.or=
g.
------=_Part_3070_1861449361.1516291741524
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">If you <b>really</b> want to do something like that, it is=
already possible by returning an object with a method that actually do the=
computation.<br>But this is not something I would write nor recommend to w=
rite.<br><br>You would use such a function like this:<br><div style=3D"back=
ground-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-=
style: solid; border-width: 1px; overflow-wrap: break-word;" class=3D"prett=
yprint"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">add</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #06=
6;" class=3D"styled-by-prettify">5</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">).</span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">with</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">(</span><span style=3D"color: #066;" class=3D"styled-by-prettify"=
>8</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span=
></div></code></div><br>To implement add, you could write this:<br><div sty=
le=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187=
); border-style: solid; border-width: 1px; overflow-wrap: break-word;" clas=
s=3D"prettyprint"><code class=3D"prettyprint"><div class=3D"subprettyprint"=
><div style=3D"color: #000000;background-color: #fffffe;font-family: monosp=
ace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;=
"><div><span style=3D"color: #0000ff;"><span style=3D"color: #008;" class=
=3D"styled-by-prettify">auto</span></span><span style=3D"color: #000000;"><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> add</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">(</span></span><span sty=
le=3D"color: #0000ff;"><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">float</span></span><span style=3D"color: #000000;"><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> i</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">{</span></span></div><div><span style=3D"color: #000000;"><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0</spa=
n></span><span style=3D"color: #0000ff;"><span style=3D"color: #008;" class=
=3D"styled-by-prettify">struct</span></span><span style=3D"color: #000000;"=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">{</span></span></div><div=
><span style=3D"color: #000000;"><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=A0</span></span><span style=3D"co=
lor: #0000ff;"><span style=3D"color: #008;" class=3D"styled-by-prettify">fl=
oat</span></span><span style=3D"color: #000000;"><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> _i</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">;</span></span></div><div><span style=3D"color: #0=
00000;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =
=C2=A0 =C2=A0 =C2=A0</span></span><span style=3D"color: #0000ff;"><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">float</span></span><span s=
tyle=3D"color: #000000;"><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">w=
ith</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span=
></span><span style=3D"color: #0000ff;"><span style=3D"color: #008;" class=
=3D"styled-by-prettify">float</span></span><span style=3D"color: #000000;">=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> j</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">{</span></span></div><div><span style=3D"co=
lor: #000000;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</span></span><span style=3D"color=
: #0000ff;"><span style=3D"color: #008;" class=3D"styled-by-prettify">retur=
n</span></span><span style=3D"color: #000000;"><span style=3D"color: #000;"=
class=3D"styled-by-prettify"> _i </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">+</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> j</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">;</span></span></div><div><span style=3D"color: #000000;"><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=
=A0</span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span=
></span></div><div><span style=3D"color: #000000;"><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> R</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify">i</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">};</span></span></div><div><span style=3D"color: #000000;"><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0</span></span>=
<span style=3D"color: #0000ff;"><span style=3D"color: #008;" class=3D"style=
d-by-prettify">return</span></span><span style=3D"color: #000000;"><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> R</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">;</span></span></div><div><span s=
tyle=3D"color: #000000;"><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">}</span></span></div></div></div></code></div><br><br><br><br>Le je=
udi 18 janvier 2018 16:11:22 UTC+1, meoe...@gmail.com a =C3=A9crit=C2=A0:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;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 abou=
t being able to continue the name of a function after the end of the parent=
hesis to do things like:<br>- put(data)inVector<br>- print(text)inFile<br>-=
is(myClass)aGraphNode<br><br>Perhaps also doing things like this:<br>- rea=
d(myArticle)withEncoding(<wbr>encoding)<br>- add(5)toVar(x)<br>- put(myInt)=
inVector(myVector)<br>- place(myObject)atCoordinates(<wbr>x,y)onlyIf(myObje=
ct->canMove()<wbr>)<br><br><br>The declaration would be:<br>- void put(i=
nt d)inVector=C2=A0 { ... }<br>- void print(string t)inFile { ... }<br><br>=
- void read(const Article& art)withEncoding(const Encoding& enc) {.=
...}<br>- void place(Object& 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'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't think it would be hard to process by a compiler, it could change=
=20
the method name to "placeatCoordinateonlyIf(<wbr>Object& o, int x,=
int y,
boolean b)"<br><br>Thanks for reading and for any remarks<br></div></=
blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/586a1ba6-3f2e-4e8c-a7c1-8053d6b1491f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/586a1ba6-3f2e-4e8c-a7c1-8053d6b1491f=
%40isocpp.org</a>.<br />
------=_Part_3070_1861449361.1516291741524--
------=_Part_3069_1846109664.1516291741523--
.