Topic: Looking for "User-defined operators for fun and profit
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sat, 01 Feb 2014 06:52:36 +0100
Raw View
Hi,
has someone a pointer to "B. Stroustrup: "User-defined operators for fun
and profit," Overload April, 1998"?
Thanks in advance,
Vicente
P.S. Goggling didn't give any satisfactory results for me.
--
---
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/.
.
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Sat, 1 Feb 2014 10:55:21 +0100
Raw View
2014-02-01 Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>:
> Hi,
>
> has someone a pointer to "B. Stroustrup: "User-defined operators for fun and
> profit," Overload April, 1998"?
I'm don't believe that this article really exists, because
http://accu.org/var/uploads/journals/overload25.pdf
which contains the famous "whitespace overloading" article has been
written in April 1998 ;-)
- Daniel
>
> Thanks in advance,
> Vicente
>
> P.S. Goggling didn't give any satisfactory results for me.
>
> --
>
> --- 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/.
--
---
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/.
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sat, 01 Feb 2014 14:19:50 +0100
Raw View
This is a multi-part message in MIME format.
--------------080005020403060106000004
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Le 01/02/14 10:55, Daniel Kr=FCgler a =E9crit :
> 2014-02-01 Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>:
>> Hi,
>>
>> has someone a pointer to "B. Stroustrup: "User-defined operators for fun=
and
>> profit," Overload April, 1998"?
> I'm don't believe that this article really exists, because
>
> http://accu.org/var/uploads/journals/overload25.pdf
>
> which contains the famous "whitespace overloading" article has been
> written in April 1998 ;-)
I've got the reference from just this paper:
"The facilities for defining new operators, such as :::, <>, pow , and=20
abs are described in a companion
paper [*B. Stroustrup: "User-defined operators for fun and profit,"=20
Overload April, 1998]*.
Basically, this mechanism builds on experience from Algol68 and ML to=20
allow the programmer to assign
useful - and often conventional - meaning to expressions such as
double d =3D z pow 2 + abs y;
and
if (z <> ns:::2) // ...
This facility is conceptually simple, type safe, conventional, and very=20
simple to implement."
Bjarne, maybe you remember if the named paper is available.
Best,
Vicente
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--------------080005020403060106000004
Content-Type: text/html; charset=ISO-8859-1
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 01/02/14 10:55, Daniel Krügler a
écrit :<br>
</div>
<blockquote
cite="mid:CAGNvRgB2RX802POrEeB9MJndTARRM-GEEq8FybptOq759ExRFA@mail.gmail.com"
type="cite">
<pre wrap="">2014-02-01 Vicente J. Botet Escriba <a class="moz-txt-link-rfc2396E" href="mailto:vicente.botet@wanadoo.fr"><vicente.botet@wanadoo.fr></a>:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
has someone a pointer to "B. Stroustrup: "User-defined operators for fun and
profit," Overload April, 1998"?
</pre>
</blockquote>
<pre wrap="">
I'm don't believe that this article really exists, because
<a class="moz-txt-link-freetext" href="http://accu.org/var/uploads/journals/overload25.pdf">http://accu.org/var/uploads/journals/overload25.pdf</a>
which contains the famous "whitespace overloading" article has been
written in April 1998 ;-)
</pre>
</blockquote>
<br>
I've got the reference from just this paper:<br>
<br>
"The facilities for defining new operators, such as :::, <>,
pow , and abs are described in a companion<br>
paper [<b>B. Stroustrup: "User-defined operators for fun and
profit," Overload April, 1998]</b>.<br>
Basically, this mechanism builds on experience from Algol68 and ML
to allow the programmer to assign<br>
useful - and often conventional - meaning to expressions such as<br>
double d = z pow 2 + abs y;<br>
and<br>
if (z <> ns:::2) // …<br>
This facility is conceptually simple, type safe, conventional, and
very simple to implement."<br>
<blockquote
cite="mid:CAGNvRgB2RX802POrEeB9MJndTARRM-GEEq8FybptOq759ExRFA@mail.gmail.com"
type="cite">
</blockquote>
Bjarne, maybe you remember if the named paper is available.<br>
<br>
Best,<br>
Vicente<br>
</body>
</html>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />
--------------080005020403060106000004--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sat, 1 Feb 2014 15:47:01 +0200
Raw View
On 1 February 2014 15:19, Vicente J. Botet Escriba
<vicente.botet@wanadoo.fr> wrote:
> I've got the reference from just this paper:
>
> "The facilities for defining new operators, such as :::, <>, pow , and abs
> are described in a companion
> paper [B. Stroustrup: "User-defined operators for fun and profit," Overload
> April, 1998].
> Basically, this mechanism builds on experience from Algol68 and ML to allow
> the programmer to assign
> useful - and often conventional - meaning to expressions such as
> double d = z pow 2 + abs y;
> and
> if (z <> ns:::2) // ...
> This facility is conceptually simple, type safe, conventional, and very
> simple to implement."
>
> Bjarne, maybe you remember if the named paper is available.
"This paper outlines the proposal for
generalizing the overloading rules for
Standard C++ that is expected to become part
of the next revision of the standard. The focus
is on general ideas rather than technical
details (which can be found in AT&T Labs
Technical Report no. 42, April 1,1998)."
No. 42, published on April 1st, the year is insignificant. It's an April Fools'
joke.
--
---
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/.
.
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Sat, 1 Feb 2014 14:49:08 +0100
Raw View
2014-02-01 Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>:
> Le 01/02/14 10:55, Daniel Kr=FCgler a =E9crit :
>
> 2014-02-01 Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>:
>
> Hi,
>
> has someone a pointer to "B. Stroustrup: "User-defined operators for fun =
and
> profit," Overload April, 1998"?
>
> I'm don't believe that this article really exists, because
>
> http://accu.org/var/uploads/journals/overload25.pdf
>
> which contains the famous "whitespace overloading" article has been
> written in April 1998 ;-)
>
>
> I've got the reference from just this paper:
>
> "The facilities for defining new operators, such as :::, <>, pow , and ab=
s
> are described in a companion
> paper [B. Stroustrup: "User-defined operators for fun and profit," Overlo=
ad
> April, 1998].
Yes, I'm aware of this and this is the reason why I think that it is
just part of the joke.
- Daniel
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
.
Author: potswa@gmail.com
Date: Sat, 1 Feb 2014 22:58:06 +0800
Raw View
--Apple-Mail=_DBB39FA7-4ABB-4604-9EF6-A609E1FFC8EA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1
On Feb 1, 2014, at 9:49 PM, Daniel Kr=FCgler <daniel.kruegler@gmail.com> wr=
ote:
> Yes, I'm aware of this and this is the reason why I think that it is
> just part of the joke.
So it comes full circle...
I just read N3553, and I don't see a mention of motivation for using punctu=
ation mentioned -- it seems taken for granted. Moreover the proposed :=3D: =
is right-associative, such that a sequence of swap operations implements a =
rotation. Right associativity implies rightward-by-one rotation (and evalua=
tion to the initially rightmost value stored in the leftmost object), which=
is nice, but a bit arbitrary and sure to confuse many. Also, a rename woul=
d force migration of all preexisting code using the name swap.
Did I miss something in the paper? I feel crazy that there was already a lo=
ng discussion and nobody mentioned this.
As for non-contextually defining swap over primitive values, which don't be=
nefit from ADL, could the solution be to introduce an artificial namespace =
association for them? That is, to fix ADL, not work around it?
But speaking of :::, shouldn't that have a special tokenizing rule for symm=
etry with <::? (The scope specifier has no postfix meaning, so three colons=
must invariably be ill-formed, with the user's intent presumably being to =
form : ::.)
Ex:
case 5:::namespace_func();
~~~
(a<b?3:::qu::al::ified)
~~~
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--Apple-Mail=_DBB39FA7-4ABB-4604-9EF6-A609E1FFC8EA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ISO-8859-1
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dwindows-1252"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-=
mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 1=
, 2014, at 9:49 PM, Daniel Kr=FCgler <<a href=3D"mailto:daniel.kruegler@=
gmail.com">daniel.kruegler@gmail.com</a>> wrote:</div><br class=3D"Apple=
-interchange-newline"><blockquote type=3D"cite"><div style=3D"font-size: 12=
px; font-style: normal; font-variant: normal; font-weight: normal; letter-s=
pacing: normal; line-height: normal; orphans: auto; text-align: start; text=
-indent: 0px; text-transform: none; white-space: normal; widows: auto; word=
-spacing: 0px; -webkit-text-stroke-width: 0px;">Yes, I'm aware of this and =
this is the reason why I think that it is<br>just part of the joke.<br></di=
v></blockquote><div><br></div><div>So it comes full circle…</div><di=
v><br></div><div>I just read N3553, and I don’t see a mention of moti=
vation for using punctuation mentioned — it seems taken for granted. =
Moreover the proposed <font face=3D"Courier">:=3D:</font> is right-associat=
ive, such that a sequence of swap operations implements a rotation. Right a=
ssociativity implies rightward-by-one rotation (and evaluation to the initi=
ally rightmost value stored in the leftmost object), which is nice, but a b=
it arbitrary and sure to confuse many. Also, a rename would force migration=
of all preexisting code using the name <font face=3D"Courier">swap</font>.=
</div><div><br></div><div>Did I miss something in the paper? I feel crazy t=
hat there was already a long discussion and nobody mentioned this.</div><di=
v><br></div><div>As for non-contextually defining swap over primitive value=
s, which don’t benefit from ADL, could the solution be to introduce a=
n artificial namespace association for them? That is, to fix ADL, not work =
around it?</div><div><br></div><div>But speaking of <font face=3D"Courier">=
:::</font>, shouldn’t that have a special tokenizing rule for symmetr=
y with <font face=3D"Courier"><::</font>? (The scope specifier has =
no postfix meaning, so three colons must invariably be ill-formed, with the=
user’s intent presumably being to form <font face=3D"Courier">:=
::</font>.)</div><div><br></div><div>Ex:</div><div><br></div><div><font fa=
ce=3D"Courier">case 5:::namespace_func();</font></div><div><font face=3D"Co=
urier"> ~~~</font></div><div><font face=3D"Courier">(a&=
lt;b?3:::qu::al::ified)</font></div><div><font face=3D"Courier"> &nbs=
p; ~~~</font></div><div><font face=3D"Courier"><br></font></div></di=
v></body></html>
<p></p>
-- <br />
<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--Apple-Mail=_DBB39FA7-4ABB-4604-9EF6-A609E1FFC8EA--
.
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Sat, 1 Feb 2014 16:18:34 +0100
Raw View
2014-02-01 <potswa@gmail.com>:
>
> On Feb 1, 2014, at 9:49 PM, Daniel Kr=FCgler <daniel.kruegler@gmail.com>
> wrote:
>
> Yes, I'm aware of this and this is the reason why I think that it is
> just part of the joke.
>
>
> So it comes full circle...
>
> I just read N3553, and I don't see a mention of motivation for using
> punctuation mentioned -- it seems taken for granted. Moreover the propose=
d
> :=3D: is right-associative, such that a sequence of swap operations imple=
ments
> a rotation. Right associativity implies rightward-by-one rotation (and
> evaluation to the initially rightmost value stored in the leftmost object=
),
> which is nice, but a bit arbitrary and sure to confuse many. Also, a rena=
me
> would force migration of all preexisting code using the name swap.
N3553 was discussed during the Bristol meeting by the Evolution group.
I didn't participate during that discussion but from the wiki notes
the discussion ended with the following:
"Daveed: does it really solve them? The operator will still be found by ADL=
..
Matt: maybe, since this would use an intrinsic in place of the general
std::swap template.
Bjarne: But swap() isn't going away because of backward compatibility,
so now we'll have swap() and operator:=3D:. "Probably a good idea if we
had a time machine". Introducing a new operator, it has to be really
central and helpful. If it got us out of our swap problem it might be
good enough, but it isn't. Libraries aren't going to stop calling swap
and if they did then all the specialized swap functions people have
written wouldn't get invoked. Problems are real, but the benefits it
would have (i.e. what problem it would actually solve) aren't
sufficiently explained. Too likely that swap and :=3D: would coexist
indefinitely and that all the problems of swap would persist.
General agreement that this is a real problem but that it's not clear
why this would solve them. We will not proceed with this. "
So, yes, there were several problems of the proposal mentioned, albeit
I couldn't find your point.
- Daniel
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
.
Author: David Krauss <potswa@gmail.com>
Date: Sat, 1 Feb 2014 07:23:41 -0800 (PST)
Raw View
------=_Part_2793_30008906.1391268221038
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Saturday, February 1, 2014 11:18:34 PM UTC+8, Daniel Kr=C3=BCgler wrote:
>
> So, yes, there were several problems of the proposal mentioned, albeit=20
> I couldn't find your point.=20
>
That discussion is close enough to being exactly my point, thanks :)=20
The associativity/rotating bit is tangential.
As for triple colon, not sure what to do with that. Perhaps implement it in=
=20
my own C++ implementation and issue a warning to remain compliant :P
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
------=_Part_2793_30008906.1391268221038
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Saturday, February 1, 2014 11:18:34 PM UTC+8, D=
aniel Kr=C3=BCgler wrote:<blockquote class=3D"gmail_quote" style=3D"margin:=
0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">So, y=
es, there were several problems of the proposal mentioned, albeit
<br>I couldn't find your point.
<br></blockquote><div><br>That discussion is close enough to being exactly =
my point, thanks :) <br><br>The associativity/rotating bit is tangential.<b=
r><br>As for triple colon, not sure what to do with that. Perhaps implement=
it in my own C++ implementation and issue a warning to remain compliant :P=
<br><br></div></div>
<p></p>
-- <br />
<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_2793_30008906.1391268221038--
.
Author: Evgeny Panasyuk <evgeny.panasyuk@gmail.com>
Date: Sun, 2 Feb 2014 03:41:45 -0800 (PST)
Raw View
------=_Part_3101_19842231.1391341305766
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
1 Feb 2014 =D0=B3., 18:58:06 UTC+4 David Krauss:
> I just read N3553, and I don=E2=80=99t see a mention of motivation for us=
ing=20
> punctuation mentioned =E2=80=94 it seems taken for granted. Moreover the =
proposed=20
> :=3D: is right-associative, such that a sequence of swap operations=20
> implements a rotation. Right associativity implies rightward-by-one=20
> rotation (and evaluation to the initially rightmost value stored in the=
=20
> leftmost object), which is nice, but a bit arbitrary and sure to confuse=
=20
> many.
>
Rotation expressed by chain of infix swaps has inherent performance issue.
Usually swap between two values logically involves 3 copy/move assignments.
Rotation of N values using infix swap v1 :=3D: v2 :=3D: ... :=3D: vN would=
=20
require (N-1)*3 assignments.
But using variadic function it becomes: cycle(v1,v2,...,vN) with N+1=20
assignments. (refer http://www.stepanovpapers.com/notes.pdf)
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
------=_Part_3101_19842231.1391341305766
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">1 Feb 2014 =D0=B3., 18:58:06 UTC+4 David Krauss:<br><=
blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bord=
er-left: 1px #ccc solid;padding-left: 1ex;"><div style=3D"word-wrap:break-w=
ord"><div><div>I just read N3553, and I don=E2=80=99t see a mention of moti=
vation for using punctuation mentioned =E2=80=94 it seems taken for granted=
.. Moreover the proposed <font face=3D"Courier">:=3D:</font> is right-associ=
ative, such that a sequence of swap operations implements a rotation. Right=
associativity implies rightward-by-one rotation (and evaluation to the ini=
tially rightmost value stored in the leftmost object), which is nice, but a=
bit arbitrary and sure to confuse many.<br></div></div></div></blockquote>=
<div><br>Rotation expressed by chain of infix swaps has inherent performanc=
e issue.<br><br>Usually swap between two values logically involves 3 copy/m=
ove assignments.<br>Rotation of N values using infix swap v1 :=3D: v2 :=3D:=
... :=3D: vN would require (N-1)*3 assignments.<br><br>But using variadic =
function it becomes: cycle(v1,v2,...,vN) with N+1 assignments. (refer http:=
//www.stepanovpapers.com/notes.pdf)<br></div></div>
<p></p>
-- <br />
<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_3101_19842231.1391341305766--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sun, 02 Feb 2014 14:32:37 +0100
Raw View
Le 01/02/14 14:47, Ville Voutilainen a =E9crit :
> On 1 February 2014 15:19, Vicente J. Botet Escriba
> <vicente.botet@wanadoo.fr> wrote:
>> I've got the reference from just this paper:
>>
>> "The facilities for defining new operators, such as :::, <>, pow , and a=
bs
>> are described in a companion
>> paper [B. Stroustrup: "User-defined operators for fun and profit," Overl=
oad
>> April, 1998].
>> Basically, this mechanism builds on experience from Algol68 and ML to al=
low
>> the programmer to assign
>> useful - and often conventional - meaning to expressions such as
>> double d =3D z pow 2 + abs y;
>> and
>> if (z <> ns:::2) // ...
>> This facility is conceptually simple, type safe, conventional, and very
>> simple to implement."
>>
>> Bjarne, maybe you remember if the named paper is available.
>
> "This paper outlines the proposal for
> generalizing the overloading rules for
> Standard C++ that is expected to become part
> of the next revision of the standard. The focus
> is on general ideas rather than technical
> details (which can be found in AT&T Labs
> Technical Report no. 42, April 1,1998)."
>
> No. 42, published on April 1st, the year is insignificant. It's an April=
Fools'
> joke.
>
:(
Vicente
P.S. To those that have added some comments related to the swap=20
operator. Please continue it on another thread.
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
.
Author: "Billy O'Neal" <billy.oneal@gmail.com>
Date: Mon, 3 Feb 2014 08:53:15 -0800
Raw View
--089e013a12f881e60b04f1835e5b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
True, but the swap is likely to be inlined and the redundant load optimized
out. (It may even make sense to explicitly allow implementations to make
such an optimization; similar to how copy elision is allowed today)
Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
On Sun, Feb 2, 2014 at 3:41 AM, Evgeny Panasyuk
<evgeny.panasyuk@gmail.com>wrote:
> 1 Feb 2014 =D0=B3., 18:58:06 UTC+4 David Krauss:
>
>> I just read N3553, and I don=E2=80=99t see a mention of motivation for u=
sing
>> punctuation mentioned =E2=80=94 it seems taken for granted. Moreover the=
proposed
>> :=3D: is right-associative, such that a sequence of swap operations
>> implements a rotation. Right associativity implies rightward-by-one
>> rotation (and evaluation to the initially rightmost value stored in the
>> leftmost object), which is nice, but a bit arbitrary and sure to confuse
>> many.
>>
>
> Rotation expressed by chain of infix swaps has inherent performance issue=
..
>
> Usually swap between two values logically involves 3 copy/move assignment=
s.
> Rotation of N values using infix swap v1 :=3D: v2 :=3D: ... :=3D: vN woul=
d
> require (N-1)*3 assignments.
>
> But using variadic function it becomes: cycle(v1,v2,...,vN) with N+1
> assignments. (refer http://www.stepanovpapers.com/notes.pdf)
>
> --
>
> ---
> 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/.
>
t
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--089e013a12f881e60b04f1835e5b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">True, but the swap is likely to be inlined and the redunda=
nt load optimized out. (It may even make sense to explicitly allow implemen=
tations to make such an optimization; similar to how copy elision is allowe=
d today)</div>
<div class=3D"gmail_extra"><br clear=3D"all"><div><div dir=3D"ltr"><div>Bil=
ly O'Neal</div><div><a href=3D"https://bitbucket.org/BillyONeal/" targe=
t=3D"_blank">https://github.com/BillyONeal/</a></div><div><a href=3D"http:/=
/stackoverflow.com/users/82320/billy-oneal" target=3D"_blank">http://stacko=
verflow.com/users/82320/billy-oneal</a></div>
</div></div>
<br><br><div class=3D"gmail_quote">On Sun, Feb 2, 2014 at 3:41 AM, Evgeny P=
anasyuk <span dir=3D"ltr"><<a href=3D"mailto:evgeny.panasyuk@gmail.com" =
target=3D"_blank">evgeny.panasyuk@gmail.com</a>></span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
solid;padding-left:1ex">
<div dir=3D"ltr">1 Feb 2014=C2=A0=D0=B3., 18:58:06 UTC+4 David Krauss:<br><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding-=
left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-le=
ft-style:solid">
<div style><div><div>I just read N3553, and I don=E2=80=99t see a mention o=
f motivation for using punctuation mentioned =E2=80=94 it seems taken for g=
ranted. Moreover the proposed <font face=3D"Courier">:=3D:</font> is right-=
associative, such that a sequence of swap operations implements a rotation.=
Right associativity implies rightward-by-one rotation (and evaluation to t=
he initially rightmost value stored in the leftmost object), which is nice,=
but a bit arbitrary and sure to confuse many.<br>
</div></div></div></blockquote><div><br>Rotation expressed by chain of infi=
x swaps has inherent performance issue.<br><br>Usually swap between two val=
ues logically involves 3 copy/move assignments.<br>Rotation of N values usi=
ng infix swap v1 :=3D: v2 :=3D: ... :=3D: vN would require (N-1)*3 assignme=
nts.<br>
<br>But using variadic function it becomes: cycle(v1,v2,...,vN) with N+1 as=
signments. (refer <a href=3D"http://www.stepanovpapers.com/notes.pdf" targe=
t=3D"_blank">http://www.stepanovpapers.com/notes.pdf</a>)<span class=3D"HOE=
nZb"><font color=3D"#888888"><br>
</font></span></div></div><span class=3D"HOEnZb"><font color=3D"#888888">
<p></p>
-- <br>
=C2=A0<br>
--- <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%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</font></span></blockquote></div><br></div>t
<p></p>
-- <br />
<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--089e013a12f881e60b04f1835e5b--
.