Topic: Request for interest: math function objects and


Author: german.gomez@personifyinc.com
Date: Wed, 5 Nov 2014 00:28:16 -0800 (PST)
Raw View
------=_Part_3507_1131209222.1415176096175
Content-Type: multipart/alternative;
 boundary="----=_Part_3508_560667263.1415176096175"

------=_Part_3508_560667263.1415176096175
Content-Type: text/plain; charset=UTF-8

Hello everyone,

This is actually a continuation of my previous thread "Small improvements:
Implicitely bindable func objects, math func object extended placeholders."
I attach a draft of the proposal. Actually it is a 3-in-1 proposal, so it
could be split further if needed.

See attachment, please, and give me some feedback if possible, even if the
feedback is: not interesting :D

P.S.: I am a newbie at writing anything resembling a paper, so be
forgiving, and it is a draft.




--

---
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/.

------=_Part_3508_560667263.1415176096175
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello everyone,<div><br></div><div>This is actually a cont=
inuation of my previous thread <font size=3D"2">"Small improvements: Implic=
itely bindable func objects, math func object extended placeholders."</font=
></div><div><font size=3D"2">I attach a draft of the proposal. Actually it =
is a 3-in-1 proposal, so it could be split further if needed.</font></div><=
div><font size=3D"2"><br></font></div><div><font size=3D"2">See attachment,=
 please, and give me some feedback if possible, even if the feedback is: no=
t interesting :D</font></div><div><font size=3D"2"><br></font></div><div><f=
ont size=3D"2">P.S.: I am a newbie at writing anything resembling a paper, =
so be forgiving, and it is a draft.</font></div><div><font size=3D"2"><br><=
/font></div><div><font size=3D"2"><br></font></div><div><font size=3D"2"><b=
r></font></div><div><font size=3D"2"><br></font></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&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 />
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_3508_560667263.1415176096175--
------=_Part_3507_1131209222.1415176096175
Content-Type: text/html; charset=UTF-8;
 name=math_func_objcs_overload_ph.html
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=math_func_objcs_overload_ph.html
X-Attachment-Id: e8eef7d9-d20e-4954-8538-4bed204dde9f
Content-ID: <e8eef7d9-d20e-4954-8538-4bed204dde9f>

<?xml version=3D"1.0" encoding=3D"utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en">
<head>
<title>Function objects for math. Overloaded placeholder operators.</title>
<!-- 2014-11-05 Wed 15:22 -->
<meta  http-equiv=3D"Content-Type" content=3D"text/html;charset=3Dutf-8" />
<meta  name=3D"generator" content=3D"Org-mode" />
<meta  name=3D"author" content=3D"Germ=C3=A1n Diago G=C3=B3mez" />
<style type=3D"text/css">
 <!--/*--><![CDATA[/*><!--*/
  .title  { text-align: center; }
  .todo   { font-family: monospace; color: red; }
  .done   { color: green; }
  .tag    { background-color: #eee; font-family: monospace;
            padding: 2px; font-size: 80%; font-weight: normal; }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  .right  { margin-left: auto; margin-right: 0px;  text-align: right; }
  .left   { margin-left: 0px;  margin-right: auto; text-align: left; }
  .center { margin-left: auto; margin-right: auto; text-align: center; }
  .underline { text-decoration: underline; }
  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
  p.verse { margin-left: 3%; }
  pre {
    border: 1px solid #ccc;
    box-shadow: 3px 3px 3px #eee;
    padding: 8pt;
    font-family: monospace;
    overflow: auto;
    margin: 1.2em;
  }
  pre.src {
    position: relative;
    overflow: visible;
    padding-top: 1.2em;
  }
  pre.src:before {
    display: none;
    position: absolute;
    background-color: white;
    top: -10px;
    right: 10px;
    padding: 3px;
    border: 1px solid black;
  }
  pre.src:hover:before { display: inline;}
  pre.src-sh:before    { content: 'sh'; }
  pre.src-bash:before  { content: 'sh'; }
  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
  pre.src-R:before     { content: 'R'; }
  pre.src-perl:before  { content: 'Perl'; }
  pre.src-java:before  { content: 'Java'; }
  pre.src-sql:before   { content: 'SQL'; }

  table { border-collapse:collapse; }
  caption.t-above { caption-side: top; }
  caption.t-bottom { caption-side: bottom; }
  td, th { vertical-align:top;  }
  th.right  { text-align: center;  }
  th.left   { text-align: center;   }
  th.center { text-align: center; }
  td.right  { text-align: right;  }
  td.left   { text-align: left;   }
  td.center { text-align: center; }
  dt { font-weight: bold; }
  .footpara:nth-child(2) { display: inline; }
  .footpara { display: block; }
  .footdef  { margin-bottom: 1em; }
  .figure { padding: 1em; }
  .figure p { text-align: center; }
  .inlinetask {
    padding: 10px;
    border: 2px solid gray;
    margin: 10px;
    background: #ffffcc;
  }
  #org-div-home-and-up
   { text-align: right; font-size: 70%; white-space: nowrap; }
  textarea { overflow-x: auto; }
  .linenr { font-size: smaller }
  .code-highlighted { background-color: #ffff00; }
  .org-info-js_info-navigation { border-style: none; }
  #org-info-js_console-label
    { font-size: 10px; font-weight: bold; white-space: nowrap; }
  .org-info-js_search-highlight
    { background-color: #ffff00; color: #000000; font-weight: bold; }
  /*]]>*/-->
</style>
<script type=3D"text/javascript">
/*
@licstart  The following is the entire license notice for the
JavaScript code in this tag.

Copyright (C) 2012-2013 Free Software Foundation, Inc.

The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version.  The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.


@licend  The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target =3D document.getElementById(id);
   if(null !=3D target) {
     elem.cacheClassElem =3D elem.className;
     elem.cacheClassTarget =3D target.className;
     target.className =3D "code-highlighted";
     elem.className   =3D "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target =3D document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className =3D elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className =3D elem.cacheClassTarget;
 }
/*]]>*///-->
</script>
</head>
<body>
<div id=3D"content">
<h1 class=3D"title">Function objects for math. Overloaded placeholder opera=
tors.</h1>
<div id=3D"table-of-contents">
<h2>Table of Contents</h2>
<div id=3D"text-table-of-contents">
<ul>
<li><a href=3D"#sec-1">1. Rationale and examples</a></li>
<li><a href=3D"#sec-2">2. This proposal advantages and disadvantages</a>
<ul>
<li><a href=3D"#sec-2-1">2.1. Advantages.</a></li>
<li><a href=3D"#sec-2-2">2.2. Disadvantages</a></li>
</ul>
</li>
<li><a href=3D"#sec-3">3. Alternatives</a></li>
<li><a href=3D"#sec-4">4. References</a></li>
</ul>
</div>
</div>
<div id=3D"outline-container-sec-1" class=3D"outline-2">
<h2 id=3D"sec-1"><span class=3D"section-number-2">1</span> Rationale and ex=
amples</h2>
<div class=3D"outline-text-2" id=3D"text-1">
<p>
Standard library algorithms are becoming of common
use in the context of modern C++.
C++11 brought lambdas to us, making algorithms much more usable.
C++14 completed this work with generic lambdas.
</p>

<p>
However, sometimes, writing a lambda still requires
a lot of ceremony compared to the body of the lambda itself,
since lambdas with one single return statement are very common.
</p>

<p>
I will compare the length of code with what we can achieve currently
with C++14 vs this proposal:
</p>

<div class=3D"org-src-container">

<pre class=3D"src src-C++">//Using lambdas
all_of(begin(vec), end(vec), [](int a) { return a &lt; 37; });
//Using bind
all_of(begin(vec), end(vec), bind(less&lt;&gt;{}, _1, 37));

//With this proposal
all_of(begin(vec) end(vec), _1 &lt; 37);
</pre>
</div>

<p>
Thanks to omitting the formal parameter, the braces, the semicolon
and the return statement, you can get much terser function objects.
</p>

<p>
Another problem that I commonly find is that I want to use a standard
library math function in the context of some algorithm. But we don't have
equivalent function objects for math functions as we have for
the standard operators. Not having function objects for
standard math functions has some drawbacks:
</p>

<ol class=3D"org-ol">
<li>I must pass a function pointer, potentially erasing the type in the typ=
e
deduction, preventing inlining.
</li>
<li>The function is overloaded, so I must resolve the function I want to pa=
ss
as the parameter, which can be a more serious problem than what it is appar=
ent,
especially for a novice.
</li>
<li>If I want to pass a function object that invokes a standard math functi=
on,
I must wrap the call in a lambda, which requires boilerplate for such a
common use case.
</li>
</ol>

<div class=3D"org-src-container">

<pre class=3D"src src-C++">//Pass function pointer directly: will be deduce=
d as a function pointer and I must say &lt;int, int&gt; explicitely.
transform(begin(vec), end(vec) begin(vec2), begin(res),
          pow&lt;int, int&gt;);

//With a lambda to avoid function pointer deduction.
transform(begin(vec), end(vec) begin(vec2), begin(res),
          [](int a, int b) { return pow(a, b); });

//With this proposal: note that you don't need to resolve the instantiation=
 explicitely and you pass a function object.
transform(begin(vec), end(vec) begin(vec2), begin(res),
          pow_fn{});
</pre>
</div>

<p>
It would be also nice to be able to call math functions with placeholders d=
irectly,
which, combined with operators can achieve things like this:
</p>

<div class=3D"org-src-container">

<pre class=3D"src src-C++">partition(vec(begin), vec(end), std::pow_b(_1, 3=
) &amp; 1);
</pre>
</div>

<p>
What I would like to achieve a flexible combination of at least
standard math functions combined with overloaded operators for placeholders=
..
</p>

<p>
To achieve that I propose:
</p>

<ol class=3D"org-ol">
<li>Math functions: Making function objects for all,
including std::max and std::min from header algorithm, the same way that we
have function objects for all operators (<code>std::less&lt;&gt;</code> etc=
..), but without <code>&lt;&gt;</code>.
</li>
<li>Placeholders: Overload all binary operators and most of the unary opera=
tors (all?)
in a way that I can combine placeholders, other bind expressions and consta=
nts.
Problem: Overloading operator=3D and operator[] requires to change
the definition of the placeholders.
</li>
<li>Autobindable math functions:
Provide a free function <code>generate_bindable</code>. This function is si=
mply
a wrapper around <code>std::bind</code> + a function object + params.
Provide free functions for all math function objects
with the name <code>mathfunc_b</code> where the implementation amounts to
calling generate<sub>bindable</sub>(<code>mathfunc_fn</code>, params&#x2026=
;). This way we have the illusion
that math functions accept placeholders and other bind expressions without =
the need
to do it explicitely all the time.
</li>
</ol>

<p>
None of these ideas are new, it has been used in libraries such as Boost.La=
mbda and
Boost.Phoenix before, but I think that for some common use cases, this
syntax is quite shorter than language provided lambdas.
</p>
</div>
</div>

<div id=3D"outline-container-sec-2" class=3D"outline-2">
<h2 id=3D"sec-2"><span class=3D"section-number-2">2</span> This proposal ad=
vantages and disadvantages</h2>
<div class=3D"outline-text-2" id=3D"text-2">
</div><div id=3D"outline-container-sec-2-1" class=3D"outline-3">
<h3 id=3D"sec-2-1"><span class=3D"section-number-3">2.1</span> Advantages.<=
/h3>
<div class=3D"outline-text-3" id=3D"text-2-1">
<ul class=3D"org-ul">
<li>It can be implemented within the language, today.
</li>
<li>You have terser syntax available, now, and not too cumbersome to implem=
ent,
apparently.
(I did a prototype impl, though not well tested yet, in half a day).
</li>
</ul>
</div>
</div>

<div id=3D"outline-container-sec-2-2" class=3D"outline-3">
<h3 id=3D"sec-2-2"><span class=3D"section-number-3">2.2</span> Disadvantage=
s</h3>
<div class=3D"outline-text-3" id=3D"text-2-2">
<ul class=3D"org-ul">
<li>Only operator overloading is supported for placeholders,
instead of the full language.
</li>
<li>Requires to adapt new functions one by one so that they accept placehol=
ders
as parameters, so the provided conveniences are just that, what the lib pro=
vides.
If you want to do it for your own types you must write your <code>myfn_b</c=
ode> functions.
</li>
</ul>
</div>
</div>
</div>

<div id=3D"outline-container-sec-3" class=3D"outline-2">
<h2 id=3D"sec-3"><span class=3D"section-number-2">3</span> Alternatives</h2=
>
<div class=3D"outline-text-2" id=3D"text-3">
<ol class=3D"org-ol">
<li>Provide terser syntax within the language, in which you can omit the
</li>
</ol>
<p>
parameters and the return keyword: (@a.age &lt; @b.age) or similar? Would w=
ork
only for unconstrained lambdas in my view.
</p>

<p>
The main advantage of this is that it would have better integration
with the language, for example, access to fields and member functions.
Placeholders cannot handle that.
</p>

<ol class=3D"org-ol">
<li>Use static reflection + operator. overloading to achieve more with plac=
eholders?
</li>
</ol>
<p>
I don't know even if it would be possible.
</p>
</div>
</div>
<div id=3D"outline-container-sec-4" class=3D"outline-2">
<h2 id=3D"sec-4"><span class=3D"section-number-2">4</span> References</h2>
<div class=3D"outline-text-2" id=3D"text-4">
<p>
TODO
</p>
</div>
</div>
</div>
<div id=3D"postamble" class=3D"status">
<p class=3D"date">Date: <span class=3D"timestamp-wrapper"><span class=3D"ti=
mestamp">&lt;2014-11-05 Wed&gt;</span></span></p>
<p class=3D"author">Author: Germ=C3=A1n Diago G=C3=B3mez</p>
<p class=3D"date">Created: 2014-11-05 Wed 15:22</p>
<p class=3D"creator">Emacs 24.3.1 (Org mode 8.2.7b)</p>
<p class=3D"validation"><a href=3D"http://validator.w3.org/check?uri=3Drefe=
rer">Validate</a></p>
</div>
</body>
</html>

------=_Part_3507_1131209222.1415176096175--

.


Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Wed, 5 Nov 2014 12:46:22 +0100
Raw View
2014-11-05 9:28 GMT+01:00  <german.gomez@personifyinc.com>:
> P.S.: I am a newbie at writing anything resembling a paper, so be forgiving,
> and it is a draft.

I'm specifically focusing on this part of your message: Please take a look at

https://isocpp.org/std/submit-a-proposal

and in particular look at a possible proposal "template":

http://open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3370.html

The very first four lines are formally quite important. Up to the time
where you have "allocated" a document number and while still being in
draft mode use

Dxxxx

as placeholder for the document number.

The project always starts with

Programming Language C++, [..]

and you should insert the relevant working group for my symbolic [..].
In your case I suggest to address

Programming Language C++, Library Evolution Working Group.

Thanks,

- Daniel

--

---
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: german.gomez@personifyinc.com
Date: Wed, 5 Nov 2014 19:36:48 -0800 (PST)
Raw View
------=_Part_2865_376453024.1415245008940
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Wednesday, November 5, 2014 6:46:25 PM UTC+7, Daniel Kr=C3=BCgler wrote:
>
> 2014-11-05 9:28 GMT+01:00  <german...@personifyinc.com <javascript:>>:=20
> > P.S.: I am a newbie at writing anything resembling a paper, so be=20
> forgiving,=20
> > and it is a draft.=20
>
> I'm specifically focusing on this part of your message: Please take a loo=
k=20
> at=20
>
> https://isocpp.org/std/submit-a-proposal=20
>
> and in particular look at a possible proposal "template": =20

http://open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3370.html=20
>
> The very first four lines are formally quite important. Up to the time=20
> where you have "allocated" a document number and while still being in=20
> draft mode use=20
>
> Dxxxx=20
>
> as placeholder for the document number.=20
>
> The project always starts with=20
>
> Programming Language C++, [..]=20
>
> and you should insert the relevant working group for my symbolic [..].=20
> In your case I suggest to address=20
>
> Programming Language C++, Library Evolution Working Group.=20
>
> Thanks,=20
>
> - Daniel=20
>

Thanks for all this great info. This wasn't something formal yet. I just=20
wanted to see if someone would be interested in this,
but I am not sure, I didn't get any replies beyond yours. Anyway, will=20
start writing the paper and we will see.

I am not sure it should be one proposal only.

Regards=20

--=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_2865_376453024.1415245008940
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Wednesday, November 5, 2014 6:46:25 PM UTC+7, 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;">2014-=
11-05 9:28 GMT+01:00 &nbsp;&lt;<a href=3D"javascript:" target=3D"_blank" gd=
f-obfuscated-mailto=3D"z7gu5VqMW7AJ" onmousedown=3D"this.href=3D'javascript=
:';return true;" onclick=3D"this.href=3D'javascript:';return true;">german.=
...@personifyinc.<wbr>com</a>&gt;:
<br>&gt; P.S.: I am a newbie at writing anything resembling a paper, so be =
forgiving,
<br>&gt; and it is a draft.
<br>
<br>I'm specifically focusing on this part of your message: Please take a l=
ook at
<br>
<br><a href=3D"https://isocpp.org/std/submit-a-proposal" target=3D"_blank" =
onmousedown=3D"this.href=3D'https://www.google.com/url?q\75https%3A%2F%2Fis=
ocpp.org%2Fstd%2Fsubmit-a-proposal\46sa\75D\46sntz\0751\46usg\75AFQjCNGlLyC=
IYYQUZNTTJdUEpCYxvwG8Ig';return true;" onclick=3D"this.href=3D'https://www.=
google.com/url?q\75https%3A%2F%2Fisocpp.org%2Fstd%2Fsubmit-a-proposal\46sa\=
75D\46sntz\0751\46usg\75AFQjCNGlLyCIYYQUZNTTJdUEpCYxvwG8Ig';return true;">h=
ttps://isocpp.org/std/submit-<wbr>a-proposal</a>
<br>
<br>and in particular look at a possible proposal "template": &nbsp;</block=
quote><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8=
ex;border-left: 1px #ccc solid;padding-left: 1ex;"><a href=3D"http://open-s=
td.org/jtc1/sc22/wg21/docs/papers/2012/n3370.html" target=3D"_blank" onmous=
edown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fopen-std.o=
rg%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2012%2Fn3370.html\46sa\75D\46sntz=
\0751\46usg\75AFQjCNFvm0wsk_paFZ3QmmJf84dC0znHcg';return true;" onclick=3D"=
this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fopen-std.org%2Fjtc1=
%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2012%2Fn3370.html\46sa\75D\46sntz\0751\46u=
sg\75AFQjCNFvm0wsk_paFZ3QmmJf84dC0znHcg';return true;">http://open-std.org/=
jtc1/sc22/<wbr>wg21/docs/papers/2012/n3370.<wbr>html</a>
<br>
<br>The very first four lines are formally quite important. Up to the time
<br>where you have "allocated" a document number and while still being in
<br>draft mode use
<br>
<br>Dxxxx
<br>
<br>as placeholder for the document number.
<br>
<br>The project always starts with
<br>
<br>Programming Language C++, [..]
<br>
<br>and you should insert the relevant working group for my symbolic [..].
<br>In your case I suggest to address
<br>
<br>Programming Language C++, Library Evolution Working Group.
<br>
<br>Thanks,
<br>
<br>- Daniel
<br></blockquote><div><br></div><div>Thanks for all this great info. This w=
asn't something formal yet. I just wanted to see if someone would be intere=
sted in this,</div><div>but I am not sure, I didn't get any replies beyond =
yours. Anyway, will start writing the paper and we will see.</div><div><br>=
</div><div>I am not sure it should be one proposal only.</div><div><br></di=
v><div>Regards&nbsp;</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&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 />
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_2865_376453024.1415245008940--

.


Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Thu, 6 Nov 2014 07:20:49 +0100
Raw View
2014-11-06 4:36 GMT+01:00  <german.gomez@personifyinc.com>:
>
>
> On Wednesday, November 5, 2014 6:46:25 PM UTC+7, Daniel Kr=C3=BCgler wrot=
e:
>>
>> 2014-11-05 9:28 GMT+01:00  <german...@personifyinc.com>:
>> > P.S.: I am a newbie at writing anything resembling a paper, so be
>> > forgiving,
>> > and it is a draft.
>>
>> I'm specifically focusing on this part of your message: Please take a lo=
ok
>> at
>>
>> https://isocpp.org/std/submit-a-proposal
>>
>> and in particular look at a possible proposal "template":
>>
>> http://open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3370.html
>>
>> The very first four lines are formally quite important. Up to the time
>> where you have "allocated" a document number and while still being in
>> draft mode use
>>
>> Dxxxx
>>
>> as placeholder for the document number.
>>
>> The project always starts with
>>
>> Programming Language C++, [..]
>>
>> and you should insert the relevant working group for my symbolic [..].
>> In your case I suggest to address
>>
>> Programming Language C++, Library Evolution Working Group.
>>
>> Thanks,
>>
>> - Daniel
>
> Thanks for all this great info. This wasn't something formal yet.

Sure, I wasn't assuming it. Nonetheless I think it's good to start
even a draft of a proposal in the manner suggested.

> I am not sure it should be one proposal only.

There is really no problem with even extreme changes as long as you
circle around draft versions.

- 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: Jonathan Coe <jbcoe@me.com>
Date: Sat, 8 Nov 2014 01:07:50 -0600
Raw View
--047d7bacb5026f02660507539642
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

C++ in my experience is read many more times than it is written and a
scripting-language-like-syntax addition that you propose would not be
beneficial. Increased writing speed comes at the cost of readability.

I would oppose this change in its current form though I'm sure others would
welcome it.

A more concise (but unambiguous at a glance) lambda syntax would be nice to
have.

Regards,

Jon



On 6 November 2014 00:20, Daniel Kr=C3=BCgler <daniel.kruegler@gmail.com> w=
rote:

> 2014-11-06 4:36 GMT+01:00  <german.gomez@personifyinc.com>:
> >
> >
> > On Wednesday, November 5, 2014 6:46:25 PM UTC+7, Daniel Kr=C3=BCgler wr=
ote:
> >>
> >> 2014-11-05 9:28 GMT+01:00  <german...@personifyinc.com>:
> >> > P.S.: I am a newbie at writing anything resembling a paper, so be
> >> > forgiving,
> >> > and it is a draft.
> >>
> >> I'm specifically focusing on this part of your message: Please take a
> look
> >> at
> >>
> >> https://isocpp.org/std/submit-a-proposal
> >>
> >> and in particular look at a possible proposal "template":
> >>
> >> http://open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3370.html
> >>
> >> The very first four lines are formally quite important. Up to the time
> >> where you have "allocated" a document number and while still being in
> >> draft mode use
> >>
> >> Dxxxx
> >>
> >> as placeholder for the document number.
> >>
> >> The project always starts with
> >>
> >> Programming Language C++, [..]
> >>
> >> and you should insert the relevant working group for my symbolic [..].
> >> In your case I suggest to address
> >>
> >> Programming Language C++, Library Evolution Working Group.
> >>
> >> Thanks,
> >>
> >> - Daniel
> >
> > Thanks for all this great info. This wasn't something formal yet.
>
> Sure, I wasn't assuming it. Nonetheless I think it's good to start
> even a draft of a proposal in the manner suggested.
>
> > I am not sure it should be one proposal only.
>
> There is really no problem with even extreme changes as long as you
> circle around draft versions.
>
> - Daniel
>
> --
>
> ---
> 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/.
>

--=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/.

--047d7bacb5026f02660507539642
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>C++ in my experience is read many more times than it =
is written and a scripting-language-like-syntax addition that you propose w=
ould not be beneficial. Increased writing speed comes at the cost of readab=
ility.=C2=A0</div><div><br><div>I would oppose this change in its current f=
orm though I&#39;m sure others would welcome it.</div><div><br></div><div>A=
 more concise (but unambiguous at a glance) lambda syntax would be nice to =
have.=C2=A0</div><div><br></div><div>Regards,</div><div><br></div><div>Jon<=
/div><div><br></div><div><br></div></div></div><div class=3D"gmail_extra"><=
br><div class=3D"gmail_quote">On 6 November 2014 00:20, Daniel Kr=C3=BCgler=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:daniel.kruegler@gmail.com" target=
=3D"_blank">daniel.kruegler@gmail.com</a>&gt;</span> wrote:<br><blockquote =
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid=
;padding-left:1ex">2014-11-06 4:36 GMT+01:00=C2=A0 &lt;<a href=3D"mailto:ge=
rman.gomez@personifyinc.com">german.gomez@personifyinc.com</a>&gt;:<br>
<span class=3D"">&gt;<br>
&gt;<br>
&gt; On Wednesday, November 5, 2014 6:46:25 PM UTC+7, Daniel Kr=C3=BCgler w=
rote:<br>
&gt;&gt;<br>
&gt;&gt; 2014-11-05 9:28 GMT+01:00=C2=A0 &lt;<a href=3D"mailto:german...@pe=
rsonifyinc.com">german...@personifyinc.com</a>&gt;:<br>
&gt;&gt; &gt; P.S.: I am a newbie at writing anything resembling a paper, s=
o be<br>
&gt;&gt; &gt; forgiving,<br>
&gt;&gt; &gt; and it is a draft.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m specifically focusing on this part of your message: Please=
 take a look<br>
&gt;&gt; at<br>
&gt;&gt;<br>
&gt;&gt; <a href=3D"https://isocpp.org/std/submit-a-proposal" target=3D"_bl=
ank">https://isocpp.org/std/submit-a-proposal</a><br>
&gt;&gt;<br>
&gt;&gt; and in particular look at a possible proposal &quot;template&quot;=
:<br>
&gt;&gt;<br>
&gt;&gt; <a href=3D"http://open-std.org/jtc1/sc22/wg21/docs/papers/2012/n33=
70.html" target=3D"_blank">http://open-std.org/jtc1/sc22/wg21/docs/papers/2=
012/n3370.html</a><br>
&gt;&gt;<br>
&gt;&gt; The very first four lines are formally quite important. Up to the =
time<br>
&gt;&gt; where you have &quot;allocated&quot; a document number and while s=
till being in<br>
&gt;&gt; draft mode use<br>
&gt;&gt;<br>
&gt;&gt; Dxxxx<br>
&gt;&gt;<br>
&gt;&gt; as placeholder for the document number.<br>
&gt;&gt;<br>
&gt;&gt; The project always starts with<br>
&gt;&gt;<br>
&gt;&gt; Programming Language C++, [..]<br>
&gt;&gt;<br>
&gt;&gt; and you should insert the relevant working group for my symbolic [=
...].<br>
&gt;&gt; In your case I suggest to address<br>
&gt;&gt;<br>
&gt;&gt; Programming Language C++, Library Evolution Working Group.<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt;<br>
&gt;&gt; - Daniel<br>
&gt;<br>
&gt; Thanks for all this great info. This wasn&#39;t something formal yet.<=
br>
<br>
</span>Sure, I wasn&#39;t assuming it. Nonetheless I think it&#39;s good to=
 start<br>
even a draft of a proposal in the manner suggested.<br>
<span class=3D""><br>
&gt; I am not sure it should be one proposal only.<br>
<br>
</span>There is really no problem with even extreme changes as long as you<=
br>
circle around draft versions.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
- Daniel<br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
<br>
---<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%2Bunsubscribe@isocpp.org">std-propo=
sals+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>
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>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
<br />
--- <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 />
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 />

--047d7bacb5026f02660507539642--

.


Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Sat, 8 Nov 2014 10:59:27 +0100
Raw View
2014-11-08 8:07 GMT+01:00 Jonathan Coe <jbcoe@me.com>:
> C++ in my experience is read many more times than it is written and a
> scripting-language-like-syntax addition that you propose would not be
> beneficial. Increased writing speed comes at the cost of readability.
>
> I would oppose this change in its current form though I'm sure others wou=
ld
> welcome it.
>
> A more concise (but unambiguous at a glance) lambda syntax would be nice =
to
> have.

Could you please point out more clearly to which part of my message(s)
you have been responding here? I don't think that I wrote anything to
which above statements make sense.

Thanks,

- Daniel

> Regards,
>
> Jon
>
>
>
> On 6 November 2014 00:20, Daniel Kr=C3=BCgler <daniel.kruegler@gmail.com>=
 wrote:
>>
>> 2014-11-06 4:36 GMT+01:00  <german.gomez@personifyinc.com>:
>> >
>> >
>> > On Wednesday, November 5, 2014 6:46:25 PM UTC+7, Daniel Kr=C3=BCgler w=
rote:
>> >>
>> >> 2014-11-05 9:28 GMT+01:00  <german...@personifyinc.com>:
>> >> > P.S.: I am a newbie at writing anything resembling a paper, so be
>> >> > forgiving,
>> >> > and it is a draft.
>> >>
>> >> I'm specifically focusing on this part of your message: Please take a
>> >> look
>> >> at
>> >>
>> >> https://isocpp.org/std/submit-a-proposal
>> >>
>> >> and in particular look at a possible proposal "template":
>> >>
>> >> http://open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3370.html
>> >>
>> >> The very first four lines are formally quite important. Up to the tim=
e
>> >> where you have "allocated" a document number and while still being in
>> >> draft mode use
>> >>
>> >> Dxxxx
>> >>
>> >> as placeholder for the document number.
>> >>
>> >> The project always starts with
>> >>
>> >> Programming Language C++, [..]
>> >>
>> >> and you should insert the relevant working group for my symbolic [..]=
..
>> >> In your case I suggest to address
>> >>
>> >> Programming Language C++, Library Evolution Working Group.
>> >>
>> >> Thanks,
>> >>
>> >> - Daniel
>> >
>> > Thanks for all this great info. This wasn't something formal yet.
>>
>> Sure, I wasn't assuming it. Nonetheless I think it's good to start
>> even a draft of a proposal in the manner suggested.
>>
>> > I am not sure it should be one proposal only.
>>
>> There is really no problem with even extreme changes as long as you
>> circle around draft versions.
>>
>> - 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: Jonathan Coe <jbcoe@me.com>
Date: Sat, 8 Nov 2014 04:46:20 -0600
Raw View
--001a11c3848ecacf5a050756a32c
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I was replying to the original post which I appreciate was not clear from
my email.

Jon

On 8 November 2014 03:59, Daniel Kr=C3=BCgler <daniel.kruegler@gmail.com> w=
rote:

> 2014-11-08 8:07 GMT+01:00 Jonathan Coe <jbcoe@me.com>:
> > C++ in my experience is read many more times than it is written and a
> > scripting-language-like-syntax addition that you propose would not be
> > beneficial. Increased writing speed comes at the cost of readability.
> >
> > I would oppose this change in its current form though I'm sure others
> would
> > welcome it.
> >
> > A more concise (but unambiguous at a glance) lambda syntax would be nic=
e
> to
> > have.
>
> Could you please point out more clearly to which part of my message(s)
> you have been responding here? I don't think that I wrote anything to
> which above statements make sense.
>
> Thanks,
>
> - Daniel
>
> > Regards,
> >
> > Jon
> >
> >
> >
> > On 6 November 2014 00:20, Daniel Kr=C3=BCgler <daniel.kruegler@gmail.co=
m>
> wrote:
> >>
> >> 2014-11-06 4:36 GMT+01:00  <german.gomez@personifyinc.com>:
> >> >
> >> >
> >> > On Wednesday, November 5, 2014 6:46:25 PM UTC+7, Daniel Kr=C3=BCgler=
 wrote:
> >> >>
> >> >> 2014-11-05 9:28 GMT+01:00  <german...@personifyinc.com>:
> >> >> > P.S.: I am a newbie at writing anything resembling a paper, so be
> >> >> > forgiving,
> >> >> > and it is a draft.
> >> >>
> >> >> I'm specifically focusing on this part of your message: Please take=
 a
> >> >> look
> >> >> at
> >> >>
> >> >> https://isocpp.org/std/submit-a-proposal
> >> >>
> >> >> and in particular look at a possible proposal "template":
> >> >>
> >> >> http://open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3370.html
> >> >>
> >> >> The very first four lines are formally quite important. Up to the
> time
> >> >> where you have "allocated" a document number and while still being =
in
> >> >> draft mode use
> >> >>
> >> >> Dxxxx
> >> >>
> >> >> as placeholder for the document number.
> >> >>
> >> >> The project always starts with
> >> >>
> >> >> Programming Language C++, [..]
> >> >>
> >> >> and you should insert the relevant working group for my symbolic
> [..].
> >> >> In your case I suggest to address
> >> >>
> >> >> Programming Language C++, Library Evolution Working Group.
> >> >>
> >> >> Thanks,
> >> >>
> >> >> - Daniel
> >> >
> >> > Thanks for all this great info. This wasn't something formal yet.
> >>
> >> Sure, I wasn't assuming it. Nonetheless I think it's good to start
> >> even a draft of a proposal in the manner suggested.
> >>
> >> > I am not sure it should be one proposal only.
> >>
> >> There is really no problem with even extreme changes as long as you
> >> circle around draft versions.
> >>
> >> - Daniel
>
> --
>
> ---
> 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/.
>

--=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/.

--001a11c3848ecacf5a050756a32c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I was replying to the original post which I appreciate was=
 not clear from my email.<div><br></div><div>Jon<br><div class=3D"gmail_ext=
ra"><br><div class=3D"gmail_quote">On 8 November 2014 03:59, Daniel Kr=C3=
=BCgler <span dir=3D"ltr">&lt;<a href=3D"mailto:daniel.kruegler@gmail.com" =
target=3D"_blank">daniel.kruegler@gmail.com</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex"><span class=3D"">2014-11-08 8:07 GMT+01:00 Jonatha=
n Coe &lt;<a href=3D"mailto:jbcoe@me.com">jbcoe@me.com</a>&gt;:<br>
&gt; C++ in my experience is read many more times than it is written and a<=
br>
&gt; scripting-language-like-syntax addition that you propose would not be<=
br>
&gt; beneficial. Increased writing speed comes at the cost of readability.<=
br>
&gt;<br>
&gt; I would oppose this change in its current form though I&#39;m sure oth=
ers would<br>
&gt; welcome it.<br>
&gt;<br>
&gt; A more concise (but unambiguous at a glance) lambda syntax would be ni=
ce to<br>
&gt; have.<br>
<br>
</span>Could you please point out more clearly to which part of my message(=
s)<br>
you have been responding here? I don&#39;t think that I wrote anything to<b=
r>
which above statements make sense.<br>
<br>
Thanks,<br>
<br>
- Daniel<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
&gt; Regards,<br>
&gt;<br>
&gt; Jon<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On 6 November 2014 00:20, Daniel Kr=C3=BCgler &lt;<a href=3D"mailto:da=
niel.kruegler@gmail.com">daniel.kruegler@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; 2014-11-06 4:36 GMT+01:00=C2=A0 &lt;<a href=3D"mailto:german.gomez=
@personifyinc.com">german.gomez@personifyinc.com</a>&gt;:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Wednesday, November 5, 2014 6:46:25 PM UTC+7, Daniel Kr=C3=
=BCgler wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 2014-11-05 9:28 GMT+01:00=C2=A0 &lt;<a href=3D"mailto:ger=
man...@personifyinc.com">german...@personifyinc.com</a>&gt;:<br>
&gt;&gt; &gt;&gt; &gt; P.S.: I am a newbie at writing anything resembling a=
 paper, so be<br>
&gt;&gt; &gt;&gt; &gt; forgiving,<br>
&gt;&gt; &gt;&gt; &gt; and it is a draft.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I&#39;m specifically focusing on this part of your messag=
e: Please take a<br>
&gt;&gt; &gt;&gt; look<br>
&gt;&gt; &gt;&gt; at<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; <a href=3D"https://isocpp.org/std/submit-a-proposal" targ=
et=3D"_blank">https://isocpp.org/std/submit-a-proposal</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; and in particular look at a possible proposal &quot;templ=
ate&quot;:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; <a href=3D"http://open-std.org/jtc1/sc22/wg21/docs/papers=
/2012/n3370.html" target=3D"_blank">http://open-std.org/jtc1/sc22/wg21/docs=
/papers/2012/n3370.html</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; The very first four lines are formally quite important. U=
p to the time<br>
&gt;&gt; &gt;&gt; where you have &quot;allocated&quot; a document number an=
d while still being in<br>
&gt;&gt; &gt;&gt; draft mode use<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Dxxxx<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; as placeholder for the document number.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; The project always starts with<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Programming Language C++, [..]<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; and you should insert the relevant working group for my s=
ymbolic [..].<br>
&gt;&gt; &gt;&gt; In your case I suggest to address<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Programming Language C++, Library Evolution Working Group=
..<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thanks,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; - Daniel<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks for all this great info. This wasn&#39;t something for=
mal yet.<br>
&gt;&gt;<br>
&gt;&gt; Sure, I wasn&#39;t assuming it. Nonetheless I think it&#39;s good =
to start<br>
&gt;&gt; even a draft of a proposal in the manner suggested.<br>
&gt;&gt;<br>
&gt;&gt; &gt; I am not sure it should be one proposal only.<br>
&gt;&gt;<br>
&gt;&gt; There is really no problem with even extreme changes as long as yo=
u<br>
&gt;&gt; circle around draft versions.<br>
&gt;&gt;<br>
&gt;&gt; - Daniel<br>
<br>
--<br>
<br>
---<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%2Bunsubscribe@isocpp.org">std-propo=
sals+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>
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>
</div></div></blockquote></div><br></div></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&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 />
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 />

--001a11c3848ecacf5a050756a32c--

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sat, 08 Nov 2014 16:11:21 +0100
Raw View
This is a multi-part message in MIME format.
--------------000500040203050003030206
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 05/11/14 09:28, german.gomez@personifyinc.com a =C3=A9crit :
> Hello everyone,
>
> This is actually a continuation of my previous thread "Small=20
> improvements: Implicitely bindable func objects, math func object=20
> extended placeholders."
> I attach a draft of the proposal. Actually it is a 3-in-1 proposal, so=20
> it could be split further if needed.
>
> See attachment, please, and give me some feedback if possible, even if=20
> the feedback is: not interesting :D
>
>
Hi,

The following

   all_of(begin(vec), end(vec), [](int a) { return a < 37; });

could be written as

   all_of(begin(vec), end(vec), [](a) { a < 37; });

if the committee adopted a terse syntax similar to the terse range based lo=
ops.

Even the {} could be suppressed when there is only an expression (I don't k=
now if this is already the case)

   all_of(begin(vec), end(vec), [](a) a < 37 );

Would this be quite short for you?

Other examples

   partition(vec(begin), vec(end), std::pow_b(_1, 3) & 1);

versus

   partition(vec(begin), vec(end), [](a) std::pow_b(a, 3) & 1);


I agree with you that using placeholders the syntax is shorter

   all_of(begin(vec), end(vec), _1 < 37 );


However having to overload all the functions with place holders seems cumbe=
rsome.
In addition the use of _1, _2 to mean the first, second arguments is weird.=
 I prefer always names that mean something.


If we want yet a more terse function for lambda, all we need is to find som=
ething shorter than

   [](a,b) a < b

We would have 3+N punctuation characters for N parameters. IMO, this would =
be a good compromise.


Respect to the function objects, I would go one step over. The library coul=
d define in addition a variable of the type pow_fn.

transform(begin(vec), end(vec) begin(vec2), begin(res), pow_fn{});

constexpr auto const & pow_ =3D|__static_const<pow_fn>::value|; // ODR tric=
k


transform(begin(vec), end(vec) begin(vec2), begin(res), pow_); // need a di=
fferent vaalue as pow is already used :(

See the blog of Eric http://ericniebler.com/2014/10/21/customization-point-=
design-in-c11-and-beyond/

Vicente





 =20

--=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/.

--------------000500040203050003030206
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3DUTF-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 05/11/14 09:28,
      <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:german.gomez@per=
sonifyinc.com">german.gomez@personifyinc.com</a> a =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote
      cite=3D"mid:2bce0d7a-d6fe-4b4f-9c34-198fb16f7365@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr">Hello everyone,
        <div><br>
        </div>
        <div>This is actually a continuation of my previous thread <font
            size=3D"2">"Small improvements: Implicitely bindable func
            objects, math func object extended placeholders."</font></div>
        <div><font size=3D"2">I attach a draft of the proposal. Actually
            it is a 3-in-1 proposal, so it could be split further if
            needed.</font></div>
        <div><font size=3D"2"><br>
          </font></div>
        <div><font size=3D"2">See attachment, please, and give me some
            feedback if possible, even if the feedback is: not
            interesting :D</font></div>
        <div><font size=3D"2"><br>
          </font></div>
        <br>
      </div>
    </blockquote>
    <font size=3D"2">Hi,<br>
      <br>
    </font>The following <br>
    <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8=
">
    <pre class=3D"src src-C++">  all_of(begin(vec), end(vec), [](int a) { r=
eturn a &lt; 37; });

could be written as

  all_of(begin(vec), end(vec), [](a) { a &lt; 37; });

if the committee adopted a terse syntax similar to the terse range based lo=
ops.

Even the {} could be suppressed when there is only an expression (I don't k=
now if this is already the case)

  all_of(begin(vec), end(vec), [](a) a &lt; 37 );

Would this be quite short for you?

Other examples

<meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8">  =
partition(vec(begin), vec(end), std::pow_b(_1, 3) &amp; 1);

versus

<meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8">  =
partition(vec(begin), vec(end), [](a) std::pow_b(a, 3) &amp; 1);<pre class=
=3D"src src-C++"></pre>
I agree with you that using placeholders the syntax is shorter

  all_of(begin(vec), end(vec), _1 &lt; 37 );


However having to overload all the functions with place holders seems cumbe=
rsome.=20
In addition the use of _1, _2 to mean the first, second arguments is weird.=
 I prefer always names that mean something.


If we want yet a more terse function for lambda, all we need is to find som=
ething shorter than

  [](a,b) a &lt; b=20

We would have 3+N punctuation characters for N parameters. IMO, this would =
be a good compromise.


Respect to the function objects, I would go one step over. The library coul=
d define in addition a variable of the type pow_fn.

<meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8">tr=
ansform(begin(vec), end(vec) begin(vec2), begin(res), pow_fn{});

constexpr auto const &amp; pow_ =3D <meta http-equiv=3D"content-type" conte=
nt=3D"text/html; charset=3DUTF-8"><code class=3D"cpp plain">__static_const&=
lt;pow_fn&gt;::value</code>; // ODR trick
<pre class=3D"src src-C++"></pre>
transform(begin(vec), end(vec) begin(vec2), begin(res), pow_); // need a di=
fferent vaalue as pow is already used :(

See the blog of Eric <a class=3D"moz-txt-link-freetext" href=3D"http://eric=
niebler.com/2014/10/21/customization-point-design-in-c11-and-beyond/">http:=
//ericniebler.com/2014/10/21/customization-point-design-in-c11-and-beyond/<=
/a>

Vicente





=C2=A0

</pre>
  </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&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 />
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 />

--------------000500040203050003030206--

.


Author: inkwizytoryankes@gmail.com
Date: Sat, 8 Nov 2014 07:41:47 -0800 (PST)
Raw View
------=_Part_1792_1050700821.1415461307967
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Some time ago, there was discussion about shorer syntax of lambda.
Proposed syntax look like this:
auto x =3D [](int*) : i; //its take pointer to int as arg
auto y =3D [] : (int*)i; //return pointer to int
colon there is require do distinguish between args and cast.

I don't think that arguments without type is good thing. Right now you can=
=20
leave arguments name in lambda:
[](X) { return 42; }
This could be new source of confusion for users.


On Saturday, November 8, 2014 4:11:24 PM UTC+1, Vicente J. Botet Escriba=20
wrote:
>
>  Le 05/11/14 09:28, german...@personifyinc.com <javascript:> a =C3=A9crit=
 :
> =20
> Hello everyone,=20
>
>  This is actually a continuation of my previous thread "Small=20
> improvements: Implicitely bindable func objects, math func object extende=
d=20
> placeholders."
> I attach a draft of the proposal. Actually it is a 3-in-1 proposal, so it=
=20
> could be split further if needed.
>
>  See attachment, please, and give me some feedback if possible, even if=
=20
> the feedback is: not interesting :D
>
> =20
>  Hi,
>
> The following=20
>
>   all_of(begin(vec), end(vec), [](int a) { return a < 37; });
>
> could be written as
>
>   all_of(begin(vec), end(vec), [](a) { a < 37; });
>
> if the committee adopted a terse syntax similar to the terse range based =
loops.
>
> Even the {} could be suppressed when there is only an expression (I don't=
 know if this is already the case)
>
>   all_of(begin(vec), end(vec), [](a) a < 37 );
>
> Would this be quite short for you?
>
> Other examples
>
>   partition(vec(begin), vec(end), std::pow_b(_1, 3) & 1);
>
> versus
>
>   partition(vec(begin), vec(end), [](a) std::pow_b(a, 3) & 1);
>
> I agree with you that using placeholders the syntax is shorter=20
> all_of(begin(vec), end(vec), _1 < 37 ); However having to overload all th=
e=20
> functions with place holders seems cumbersome. In addition the use of _1,=
=20
> _2 to mean the first, second arguments is weird. I prefer always names th=
at=20
> mean something. If we want yet a more terse function for lambda, all we=
=20
> need is to find something shorter than [](a,b) a < b We would have 3+N=20
> punctuation characters for N parameters. IMO, this would be a good=20
> compromise. Respect to the function objects, I would go one step over. Th=
e=20
> library could define in addition a variable of the type pow_fn.=20
> transform(begin(vec), end(vec) begin(vec2), begin(res), pow_fn{});=20
> constexpr auto const & pow_ =3D __static_const<pow_fn>::value; // ODR tri=
ck=20
>
> transform(begin(vec), end(vec) begin(vec2), begin(res), pow_); // need a=
=20
> different vaalue as pow is already used :( See the blog of Eric=20
> http://ericniebler.com/2014/10/21/customization-point-design-in-c11-and-b=
eyond/=20
> Vicente  =20
>
>=20

--=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_1792_1050700821.1415461307967
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Some time ago, there was discussion about shorer syntax of=
 lambda.<br>Proposed syntax look like this:<br><div class=3D"prettyprint" s=
tyle=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 1=
87); border-style: solid; border-width: 1px; word-wrap: break-word;"><code =
class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #=
008;" class=3D"styled-by-prettify">auto</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> x </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">[](</span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>int</span><span style=3D"color: #660;" class=3D"styled-by-prettify">*)</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">:</span><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;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #800;" class=3D"sty=
led-by-prettify">//its take pointer to int as arg</span><code class=3D"pret=
typrint"><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> y </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">=3D</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 style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">*)</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify">i</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> </span><span style=3D"color: #800;" class=3D=
"styled-by-prettify">//return pointer to int</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"></span></code><code class=3D"prettyprint"=
><span style=3D"color: #000;" class=3D"styled-by-prettify"></span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"><br></span></code><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"></span></div></code></div=
>colon there is require do distinguish between args and cast.<br><br>I don'=
t think that arguments without type is good thing. Right now you can leave =
arguments name in lambda:<br><div class=3D"prettyprint" style=3D"background=
-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style:=
 solid; border-width: 1px; word-wrap: break-word;"><code class=3D"prettypri=
nt"><div class=3D"subprettyprint"><span style=3D"color: #606;" class=3D"sty=
led-by-prettify">[](X)</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify"></span> { return 42; }<br></div></code></div>This could be new =
source of confusion for users.<br><br><br>On Saturday, November 8, 2014 4:1=
1:24 PM UTC+1, Vicente J. Botet Escriba wrote:<blockquote class=3D"gmail_qu=
ote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padd=
ing-left: 1ex;">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div>Le 05/11/14 09:28,
      <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"Nj=
kEHBcd0A4J" onmousedown=3D"this.href=3D'javascript:';return true;" onclick=
=3D"this.href=3D'javascript:';return true;">german...@personifyinc.com</a> =
a =C3=A9crit&nbsp;:<br>
    </div>
    <blockquote type=3D"cite">
      <div dir=3D"ltr">Hello everyone,
        <div><br>
        </div>
        <div>This is actually a continuation of my previous thread <font si=
ze=3D"2">"Small improvements: Implicitely bindable func
            objects, math func object extended placeholders."</font></div>
        <div><font size=3D"2">I attach a draft of the proposal. Actually
            it is a 3-in-1 proposal, so it could be split further if
            needed.</font></div>
        <div><font size=3D"2"><br>
          </font></div>
        <div><font size=3D"2">See attachment, please, and give me some
            feedback if possible, even if the feedback is: not
            interesting :D</font></div>
        <div><font size=3D"2"><br>
          </font></div>
        <br>
      </div>
    </blockquote>
    <font size=3D"2">Hi,<br>
      <br>
    </font>The following <br>
   =20
    <pre>  all_of(begin(vec), end(vec), [](int a) { return a &lt; 37; });

could be written as

  all_of(begin(vec), end(vec), [](a) { a &lt; 37; });

if the committee adopted a terse syntax similar to the terse range based lo=
ops.

Even the {} could be suppressed when there is only an expression (I don't k=
now if this is already the case)

  all_of(begin(vec), end(vec), [](a) a &lt; 37 );

Would this be quite short for you?

Other examples

  partition(vec(begin), vec(end), std::pow_b(_1, 3) &amp; 1);

versus

  partition(vec(begin), vec(end), [](a) std::pow_b(a, 3) &amp; 1);<pre></pr=
e>
I agree with you that using placeholders the syntax is shorter

  all_of(begin(vec), end(vec), _1 &lt; 37 );


However having to overload all the functions with place holders seems cumbe=
rsome.=20
In addition the use of _1, _2 to mean the first, second arguments is weird.=
 I prefer always names that mean something.


If we want yet a more terse function for lambda, all we need is to find som=
ething shorter than

  [](a,b) a &lt; b=20

We would have 3+N punctuation characters for N parameters. IMO, this would =
be a good compromise.


Respect to the function objects, I would go one step over. The library coul=
d define in addition a variable of the type pow_fn.

transform(begin(vec), end(vec) begin(vec2), begin(res), pow_fn{});

constexpr auto const &amp; pow_ =3D <code>__static_const&lt;pow_fn&gt;::val=
ue</code>; // ODR trick
<pre></pre>
transform(begin(vec), end(vec) begin(vec2), begin(res), pow_); // need a di=
fferent vaalue as pow is already used :(

See the blog of Eric <a href=3D"http://ericniebler.com/2014/10/21/customiza=
tion-point-design-in-c11-and-beyond/" target=3D"_blank" onmousedown=3D"this=
..href=3D'http://www.google.com/url?q\75http%3A%2F%2Fericniebler.com%2F2014%=
2F10%2F21%2Fcustomization-point-design-in-c11-and-beyond%2F\46sa\75D\46sntz=
\0751\46usg\75AFQjCNEech9kzq0UTuy2o47fGkQFvpQC9w';return true;" onclick=3D"=
this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fericniebler.com%2F2=
014%2F10%2F21%2Fcustomization-point-design-in-c11-and-beyond%2F\46sa\75D\46=
sntz\0751\46usg\75AFQjCNEech9kzq0UTuy2o47fGkQFvpQC9w';return true;">http://=
ericniebler.com/2014/<wbr>10/21/customization-point-<wbr>design-in-c11-and-=
beyond/</a>

Vicente





&nbsp;

</pre>
  </div>

</blockquote></div>

<p></p>

-- <br />
<br />
--- <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 />
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_1792_1050700821.1415461307967--

.


Author: german.gomez@personifyinc.com
Date: Mon, 10 Nov 2014 01:29:31 -0800 (PST)
Raw View
------=_Part_489_1817903815.1415611771136
Content-Type: text/plain; charset=UTF-8



>   all_of(begin(vec), end(vec), [](a) a < 37 );
>
>
Would this be quite short for you?


That is short enough and more general BUT requires a compiler extension.


> Other examples
>
>   partition(vec(begin), vec(end), std::pow_b(_1, 3) & 1);
>
> versus
>
>   partition(vec(begin), vec(end), [](a) std::pow_b(a, 3) & 1);
>
> I agree with you that using placeholders the syntax is shorter
> all_of(begin(vec), end(vec), _1 < 37 ); However having to overload all the
> functions with place holders seems cumbersome.
>
>
I agree. I couldn't find a workaround, but to use a macro that generates
all implementations for the functions. You must add them one by one.
If you don't add them one by one, for example you used a template to
generate the funcs, then the template system is going to deduce
a function pointer for the passed function, which is what I am trying to
avoid with math functions.

In addition the use of _1, _2 to mean the first, second arguments is weird. I prefer always names that mean something.
>
>
Me too. This solution is only library based. A language feature would look
different.


> If we want yet a more terse function for lambda, all we need is to find something shorter than
>
>   [](a,b) a < b
>
> We would have 3+N punctuation characters for N parameters. IMO, this would be a good compromise.
>
>
I wonder if there could possibly be a way to even suppress the parameter
list, just as with placeholders. Maybe with some kind of reserved
prefix for variables? I don't know if this would have some other negative
effects (how do I name a reference vs value, move semantics?)


> Respect to the function objects, I would go one step over. The library could define in addition a variable of the type pow_fn.
>
>
I am not sure I follow. I would propose just a type because it is what
std::less<> and all of the others do. Otherwise I would propose to add
less_fn, etc,
together with pow_fn, as variables.


> transform(begin(vec), end(vec) begin(vec2), begin(res), pow_fn{});
>
> constexpr auto const & pow_ = __static_const<pow_fn>::value; // ODR trick
>
> transform(begin(vec), end(vec) begin(vec2), begin(res), pow_); // need a
> different vaalue as pow is already used :( See the blog of Eric
> http://ericniebler.com/2014/10/21/customization-point-design-in-c11-and-beyond/
>
>
Yeah, I read this before thanks for the link, though.

All in all,

1. it seems clear to me that extending function objects to variables and
adding math function object variables could
be useful.

2. About overloading placeholders, it is not general enough as a lib
solution
, it only works with operators, but it is still useful in some common
scenarios. A language feature would be nicer maybe.

3. did you ever think if pow_fn is added as a variable, and less_fn, for
example, is added later, what if one day
the committee wants to add a function object that keeps mutable state into
the library?
A global variable would be bad in that case, since a stateful function
object would mutate that object in two different places.
You would have two "families" of function objects:

 a. The ones you use like this, stateless:    pow_fn(...); //No need to
construct
 b. The ones you use like this, stateful:    mystateful_fn{}(...); //I have
to construct it before calling.

Maybe it is better to just avoid the global variables and the user wouldn't
have to remember the fact that the object is stateless vs stateful
if the library is later extended.

Thoughts?



Vicente
>
>
>
>
>
>
>
>
>

--

---
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/.

------=_Part_489_1817903815.1415611771136
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div bgco=
lor=3D"#FFFFFF" text=3D"#000000"><pre>  all_of(begin(vec), end(vec), [](a) =
a &lt; 37 );</pre></div></blockquote><div><br></div><div><span style=3D"fon=
t-family: monospace; white-space: pre;">
Would this be quite short for you?
</span></div><div><span style=3D"font-family: monospace; white-space: pre;"=
><br></span></div><div><span style=3D"font-family: monospace; white-space: =
pre;"><br></span></div><div>That is short enough and more general BUT requi=
res a compiler extension.</div><div>&nbsp;</div><blockquote class=3D"gmail_=
quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;pa=
dding-left: 1ex;"><div bgcolor=3D"#FFFFFF" text=3D"#000000"><pre>Other exam=
ples

  partition(vec(begin), vec(end), std::pow_b(_1, 3) &amp; 1);

versus

  partition(vec(begin), vec(end), [](a) std::pow_b(a, 3) &amp; 1);<pre></pr=
e>
I agree with you that using placeholders the syntax is shorter

  all_of(begin(vec), end(vec), _1 &lt; 37 );


However having to overload all the functions with place holders seems cumbe=
rsome. </pre></div></blockquote><div><br></div><div>I agree. I couldn't fin=
d a workaround, but to use a macro that generates all implementations for t=
he functions. You must add them one by one.</div><div>If you don't add them=
 one by one, for example you used a template to generate the funcs, then th=
e template system is going to deduce</div><div>a function pointer for the p=
assed function, which is what I am trying to avoid with math functions.</di=
v><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div bgcolor=
=3D"#FFFFFF" text=3D"#000000"><pre>In addition the use of _1, _2 to mean th=
e first, second arguments is weird. I prefer always names that mean somethi=
ng.</pre></div></blockquote><div><br></div><div>Me too. This solution is on=
ly library based. A language feature would look different.</div><div>&nbsp;=
</div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8=
ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div bgcolor=3D"#FFFFFF"=
 text=3D"#000000"><pre>If we want yet a more terse function for lambda, all=
 we need is to find something shorter than

  [](a,b) a &lt; b=20

We would have 3+N punctuation characters for N parameters. IMO, this would =
be a good compromise.</pre></div></blockquote><div><br></div><div>I wonder =
if there could possibly be a way to even suppress the parameter list, just =
as with placeholders. Maybe with some kind of reserved</div><div>prefix for=
 variables? I don't know if this would have some other negative effects (ho=
w do I name a reference vs value, move semantics?)</div><div>&nbsp;</div><b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;"><div bgcolor=3D"#FFFFFF" text=3D=
"#000000"><pre>Respect to the function objects, I would go one step over. T=
he library could define in addition a variable of the type pow_fn.</pre></d=
iv></blockquote><div><br></div><div>I am not sure I follow. I would propose=
 just a type because it is what std::less&lt;&gt; and all of the others do.=
 Otherwise I would propose to add less_fn, etc,</div><div>together with pow=
_fn, as variables.</div><div>&nbsp;</div><blockquote class=3D"gmail_quote" =
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-l=
eft: 1ex;"><div bgcolor=3D"#FFFFFF" text=3D"#000000"><pre>transform(begin(v=
ec), end(vec) begin(vec2), begin(res), pow_fn{});

constexpr auto const &amp; pow_ =3D <code>__static_const&lt;pow_fn&gt;::val=
ue</code>; // ODR trick
<pre></pre>
transform(begin(vec), end(vec) begin(vec2), begin(res), pow_); // need a di=
fferent vaalue as pow is already used :(

See the blog of Eric <a href=3D"http://ericniebler.com/2014/10/21/customiza=
tion-point-design-in-c11-and-beyond/" target=3D"_blank" onmousedown=3D"this=
..href=3D'http://www.google.com/url?q\75http%3A%2F%2Fericniebler.com%2F2014%=
2F10%2F21%2Fcustomization-point-design-in-c11-and-beyond%2F\46sa\75D\46sntz=
\0751\46usg\75AFQjCNEech9kzq0UTuy2o47fGkQFvpQC9w';return true;" onclick=3D"=
this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fericniebler.com%2F2=
014%2F10%2F21%2Fcustomization-point-design-in-c11-and-beyond%2F\46sa\75D\46=
sntz\0751\46usg\75AFQjCNEech9kzq0UTuy2o47fGkQFvpQC9w';return true;">http://=
ericniebler.com/2014/<wbr>10/21/customization-point-<wbr>design-in-c11-and-=
beyond/</a></pre></div></blockquote><div><br></div><div>Yeah, I read this b=
efore thanks for the link, though.&nbsp;</div><div><br></div><div>All in al=
l,&nbsp;</div><div><br></div><div>1. it seems clear to me that extending fu=
nction objects to variables and adding math function object variables could=
</div><div>be useful.&nbsp;</div><div><br></div><div>2. About overloading p=
laceholders, it is not general enough as a lib solution</div><div>, it only=
 works with operators, but it is still useful in some common scenarios. A l=
anguage feature would be nicer maybe.</div><div><br></div><div>3. did you e=
ver think if pow_fn is added as a variable, and less_fn, for example, is ad=
ded later, what if one day&nbsp;</div><div>the committee wants to add a fun=
ction object that keeps mutable state into the library?&nbsp;</div><div>A g=
lobal variable would be bad in that case, since a stateful function object =
would mutate that object in two different places.&nbsp;</div><div>You would=
 have two "families" of function objects:</div><div><br></div><div>&nbsp;a.=
 The ones you use like this, stateless: &nbsp; &nbsp;pow_fn(...); //No need=
 to construct</div><div>&nbsp;b. The ones you use like this, stateful: &nbs=
p; &nbsp;mystateful_fn{}(...); //I have to construct it before calling.</di=
v><div><br></div><div>Maybe it is better to just avoid the global variables=
 and the user wouldn't have to remember the fact that the object is statele=
ss vs stateful</div><div>if the library is later extended.</div><div><br></=
div><div>Thoughts?</div><div><br></div><div><br></div><div><br></div><block=
quote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-le=
ft: 1px #ccc solid;padding-left: 1ex;"><div bgcolor=3D"#FFFFFF" text=3D"#00=
0000"><pre>Vicente





&nbsp;

</pre>
  </div>

</blockquote></div>

<p></p>

-- <br />
<br />
--- <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 />
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_489_1817903815.1415611771136--

.