Topic: [std-discussion] An implementation of


Author: Andrea Proli <andy.prowl@gmail.com>
Date: Sat, 12 Jan 2013 13:42:39 +0100
Raw View
--bcaec53d5aa3560fd904d316bf74
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I agree it all depends on how they are going to formalize this. I just
wanted to point out that the current interpretation of lambdas as syntactic
sugar for generating a locally defined closure won't generalize to
polymorphic lambdas, because that would make them syntactic sugar for
defining something which is not allowed otherwise. Which means, that they
would not be syntactic sugar.

Andy


On Sat, Jan 12, 2013 at 1:33 PM, Daniel Kr=FCgler
<daniel.kruegler@gmail.com>wrote:

> 2013/1/12 Andrea Proli <andy.prowl@gmail.com>:
> > Well, if an exceptional rule is to be added, then it means it does
> conflict
> > with 14/2 :) but I see what you mean.
>
> Well, I described it as "exceptional" rule, but there doesn't need to
> exist such normative sentence. It all depends on the actual wording
> for polymorphic lambdas whether such a sentence is needed. If the
> language specifies polymorphic lambda expressions and if it is clear
> that this includes local scope, there is no extra wording needed. You
> could add a non-normative note to the general exclusion rule, just as
> another example.
>
> - Daniel
>
> --
>
>
>
>

--=20




--bcaec53d5aa3560fd904d316bf74
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I agree it all depends on how they are going to formalize this. I just want=
ed to point out that the current interpretation of lambdas as syntactic sug=
ar for generating a locally defined closure won&#39;t generalize to polymor=
phic lambdas, because that would make them syntactic sugar for defining som=
ething which is not allowed otherwise. Which means, that they would not be =
syntactic sugar.<br>
<br>Andy<br><br><br><div class=3D"gmail_quote">On Sat, Jan 12, 2013 at 1:33=
 PM, Daniel Kr=FCgler <span dir=3D"ltr">&lt;<a href=3D"mailto:daniel.kruegl=
er@gmail.com" target=3D"_blank">daniel.kruegler@gmail.com</a>&gt;</span> wr=
ote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">2013/1/12 Andrea Proli &lt;<a href=3D"mailto=
:andy.prowl@gmail.com">andy.prowl@gmail.com</a>&gt;:<br>
<div class=3D"im">&gt; Well, if an exceptional rule is to be added, then it=
 means it does conflict<br>
&gt; with 14/2 :) but I see what you mean.<br>
<br>
</div>Well, I described it as &quot;exceptional&quot; rule, but there doesn=
&#39;t need to<br>
exist such normative sentence. It all depends on the actual wording<br>
for polymorphic lambdas whether such a sentence is needed. If the<br>
language specifies polymorphic lambda expressions and if it is clear<br>
that this includes local scope, there is no extra wording needed. You<br>
could add a non-normative note to the general exclusion rule, just as<br>
another example.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
- Daniel<br>
<br>
--<br>
<br>
<br>
<br>
</font></span></blockquote></div><br>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

--bcaec53d5aa3560fd904d316bf74--

.


Author: Richard Smith <richard@metafoo.co.uk>
Date: Thu, 5 Mar 2015 16:12:18 -0800
Raw View
--001a11c20324a0574d05109389f8
Content-Type: text/plain; charset=UTF-8

On Thu, Mar 5, 2015 at 3:46 PM, Matthew Fioravante <fmatthew5876@gmail.com>
wrote:

>
>
> On Thursday, March 5, 2015 at 6:19:20 PM UTC-5, Nicol Bolas wrote:
>>
>> I... just... ugh.
>>
>> I'm fine with type deduction patterns like std::vector<auto> = ...;
>> That's just a generalization of type deduction in static contexts.
>>
>> My issue is with, well, any syntax that declares a template without
>> having to type either the word "template" or the use of "<>" brackets.
>> Templates are a fundamentally different kind of construct, and we have
>> specific syntax for doing so. By removing that syntax, it becomes way too
>> easy to not notice that you've declared a template.
>>
>
> You could add a requirement for an empty template <> when using auto.
>
> template <>
> auto add(auto x, auto y) { return x + y; }
>

.... except that "template <>" currently always introduces a non-template,
and generally follows non-template rules (can be defined outside of the
header, etc). I don't think that solves the problem.

--

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

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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
hu, Mar 5, 2015 at 3:46 PM, Matthew Fioravante <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:fmatthew5876@gmail.com" target=3D"_blank">fmatthew5876@gmail.co=
m</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">=
<span class=3D""><br><br>On Thursday, March 5, 2015 at 6:19:20 PM UTC-5, Ni=
col Bolas wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-=
left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I.=
... just... ugh.<br><br>I&#39;m fine with type deduction patterns like std::=
vector&lt;auto&gt; =3D ...; That&#39;s just a generalization of type deduct=
ion in static contexts.<br><br>My issue is with, well, any syntax that decl=
ares a template without having to type either the word &quot;template&quot;=
 or the use of &quot;&lt;&gt;&quot; brackets. Templates are a fundamentally=
 different kind of construct, and we have specific syntax for doing so. By =
removing that syntax, it becomes way too easy to not notice that you&#39;ve=
 declared a template.<br></div></blockquote><div><br></div></span><div>You =
could add a requirement for an empty template &lt;&gt; when using auto.</di=
v><div><br></div><div>template &lt;&gt;</div><div>auto add(auto x, auto y) =
{ return x + y; }</div></div></blockquote><div><br></div><div>... except th=
at &quot;template &lt;&gt;&quot; currently always introduces a non-template=
, and generally follows non-template rules (can be defined outside of the h=
eader, etc). I don&#39;t think that solves the problem.</div></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 />

--001a11c20324a0574d05109389f8--

.