Topic: Again on constexpr stuff


Author: =?UTF-8?Q?Germ=C3=A1n_Diago?= <germandiago@gmail.com>
Date: Wed, 22 Oct 2014 04:55:05 -0700 (PDT)
Raw View
------=_Part_3842_1606298177.1413978905985
Content-Type: text/plain; charset=UTF-8

Hello,

Looking at the video from cppcon2014 from Nicolas Josuttis, he mentions
about constexpr:

https://www.youtube.com/watch?v=tCM4wP-dWic


There are no guidelines for applying constexpr right now.
There is added value in keeping the flexibility of choice about being able
to use a function as constexpr.

My concern is the following. If there are no rules yet, because they find
it too difficult,
I don't know why they don't fix the language directly with the following
proposition:

- Constexpr should be used only when calling a function. Functions should
not be annotated with constexpr.

1. Is this technically feasible? I see some problems: constexpr functions
are a subset of the language, the
compiler would have to detect implementation. I don't know if this is a
showstopper.

I just know that D language does that. How? They allow to use
a function at compile time:

enum val = myNonAnnotatedWithConstexprFunc();

Maybe one problem is that you must expose potentially "constexpr" functions
in header files, but once modules
kick in, should this be a problem?

I think there is potential value in fixing this.

Thanks for your time.

--

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

<div dir=3D"ltr">Hello,&nbsp;<div><br></div><div>Looking at the video from =
cppcon2014 from Nicolas Josuttis, he mentions about constexpr:</div><div><b=
r></div><div>https://www.youtube.com/watch?v=3DtCM4wP-dWic<br></div><div><b=
r></div><div><br></div><div>There are no guidelines for applying constexpr =
right now.</div><div>There is added value in keeping the flexibility of cho=
ice about being able to use a function as constexpr.</div><div><br></div><d=
iv>My concern is the following. If there are no rules yet, because they fin=
d it too difficult,</div><div>I don't know why they don't fix the language =
directly with the following proposition:</div><div><br></div><div>- Constex=
pr should be used only when calling a function. Functions should not be ann=
otated with constexpr.</div><div><br></div><div>1. Is this technically feas=
ible? I see some problems: constexpr functions are a subset of the language=
, the</div><div>compiler would have to detect implementation. I don't know =
if this is a showstopper.&nbsp;</div><div><br></div><div>I just know that D=
 language does that. How? They allow to use</div><div>a function at compile=
 time:</div><div><br></div><div>enum val =3D myNonAnnotatedWithConstexprFun=
c();</div><div><br></div><div>Maybe one problem is that you must expose pot=
entially "constexpr" functions in header files, but once modules</div><div>=
kick in, should this be a problem?</div><div><br></div><div>I think there i=
s potential value in fixing this.&nbsp;</div><div><br></div><div>Thanks for=
 your time.</div><div><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&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_3842_1606298177.1413978905985--

.


Author: "'Geoffrey Romer' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 22 Oct 2014 07:46:28 -0700
Raw View
--001a11393a8c536f9c0506040330
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

In C++, there's a general principle that you can tell whether your function
call will compile simply by looking at the function signature. This is the
cornerstone of separate compilation, and is also key to good interface
design: the signature acts as an interface boundary, which prevents callers
from depending on implementation details of the callee. This principle
doesn't always hold in the case of function templates, but there's a major
ongoing effort to add concept support to the language, which will rectify
that by allowing function templates to explicitly declare their
requirements on the argument types.

If functions were treated as always constexpr, the only way to tell whether
a compile-time call would succeed would be to examine the function's
implementation, to see if it is restricted to the constexpr subset of the
language. This is technically infeasible if the function is defined in
another compilation unit, and a violation of that principle in any event.
This has serious practical consequences: if I change an internal detail of
my function in a way that happens to use a non-constexpr-compatible
language feature, but your code is using it to initialize a constexpr
variable, at least one of us is going to have a bad time.

The rule of thumb is that "constexpr is forever": once my clients start
calling my function at compile time, I have to restrict myself to the
constexpr sublanguage basically forever, unless I'm in a position to go fix
all those clients to do something else. If I'm willing to accept that
burden, there's an easy way for me to signify that fact: add a constexpr
tag to my function declaration. What you're asking for is the ability to
unilaterally impose that burden on me, even if I've declined to accept it.
Why should the language help you do that?

On Wed, Oct 22, 2014 at 4:55 AM, Germ=C3=A1n Diago <germandiago@gmail.com> =
wrote:

> Hello,
>
> Looking at the video from cppcon2014 from Nicolas Josuttis, he mentions
> about constexpr:
>
> https://www.youtube.com/watch?v=3DtCM4wP-dWic
>
>
> There are no guidelines for applying constexpr right now.
> There is added value in keeping the flexibility of choice about being abl=
e
> to use a function as constexpr.
>
> My concern is the following. If there are no rules yet, because they find
> it too difficult,
> I don't know why they don't fix the language directly with the following
> proposition:
>
> - Constexpr should be used only when calling a function. Functions should
> not be annotated with constexpr.
>
> 1. Is this technically feasible? I see some problems: constexpr functions
> are a subset of the language, the
> compiler would have to detect implementation. I don't know if this is a
> showstopper.
>
> I just know that D language does that. How? They allow to use
> a function at compile time:
>
> enum val =3D myNonAnnotatedWithConstexprFunc();
>
> Maybe one problem is that you must expose potentially "constexpr"
> functions in header files, but once modules
> kick in, should this be a problem?
>
> I think there is potential value in fixing this.
>
> Thanks for your time.
>
>  --
>
> ---
> 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/.

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

<div dir=3D"ltr">In C++, there&#39;s a general principle that you can tell =
whether your function call will compile simply by looking at the function s=
ignature. This is the cornerstone of separate compilation, and is also key =
to good interface design: the signature acts as an interface boundary, whic=
h prevents callers from depending on implementation details of the callee. =
This principle doesn&#39;t always hold in the case of function templates, b=
ut there&#39;s a major ongoing effort to add concept support to the languag=
e, which will rectify that by allowing function templates to explicitly dec=
lare their requirements on the argument types.<div><div><br></div><div>If f=
unctions were treated as always constexpr, the only way to tell whether a c=
ompile-time call would succeed would be to examine the function&#39;s imple=
mentation, to see if it is restricted to the constexpr subset of the langua=
ge. This is technically infeasible if the function is defined in another co=
mpilation unit, and a violation of that principle in any event. This has se=
rious practical consequences: if I change an internal detail of my function=
 in a way that happens to use a non-constexpr-compatible language feature, =
but your code is using it to initialize a constexpr variable, at least one =
of us is going to have a bad time.</div></div><div><br></div><div>The rule =
of thumb is that &quot;constexpr is forever&quot;: once my clients start ca=
lling my function at compile time, I have to restrict myself to the constex=
pr sublanguage basically forever, unless I&#39;m in a position to go fix al=
l those clients to do something else. If I&#39;m willing to accept that bur=
den, there&#39;s an easy way for me to signify that fact: add a constexpr t=
ag to my function declaration. What you&#39;re asking for is the ability to=
 unilaterally impose that burden on me, even if I&#39;ve declined to accept=
 it. Why should the language help you do that?</div></div><div class=3D"gma=
il_extra"><br><div class=3D"gmail_quote">On Wed, Oct 22, 2014 at 4:55 AM, G=
erm=C3=A1n Diago <span dir=3D"ltr">&lt;<a href=3D"mailto:germandiago@gmail.=
com" target=3D"_blank">germandiago@gmail.com</a>&gt;</span> wrote:<br><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex"><div dir=3D"ltr">Hello,=C2=A0<div><br></div><div>=
Looking at the video from cppcon2014 from Nicolas Josuttis, he mentions abo=
ut constexpr:</div><div><br></div><div><a href=3D"https://www.youtube.com/w=
atch?v=3DtCM4wP-dWic" target=3D"_blank">https://www.youtube.com/watch?v=3Dt=
CM4wP-dWic</a><br></div><div><br></div><div><br></div><div>There are no gui=
delines for applying constexpr right now.</div><div>There is added value in=
 keeping the flexibility of choice about being able to use a function as co=
nstexpr.</div><div><br></div><div>My concern is the following. If there are=
 no rules yet, because they find it too difficult,</div><div>I don&#39;t kn=
ow why they don&#39;t fix the language directly with the following proposit=
ion:</div><div><br></div><div>- Constexpr should be used only when calling =
a function. Functions should not be annotated with constexpr.</div><div><br=
></div><div>1. Is this technically feasible? I see some problems: constexpr=
 functions are a subset of the language, the</div><div>compiler would have =
to detect implementation. I don&#39;t know if this is a showstopper.=C2=A0<=
/div><div><br></div><div>I just know that D language does that. How? They a=
llow to use</div><div>a function at compile time:</div><div><br></div><div>=
enum val =3D myNonAnnotatedWithConstexprFunc();</div><div><br></div><div>Ma=
ybe one problem is that you must expose potentially &quot;constexpr&quot; f=
unctions in header files, but once modules</div><div>kick in, should this b=
e a problem?</div><div><br></div><div>I think there is potential value in f=
ixing this.=C2=A0</div><div><br></div><div>Thanks for your time.</div><span=
 class=3D"HOEnZb"><font color=3D"#888888"><div><br></div></font></span></di=
v><span class=3D"HOEnZb"><font color=3D"#888888">

<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" 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>

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

--001a11393a8c536f9c0506040330--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 22 Oct 2014 18:58:45 +0300
Raw View
On 22 October 2014 14:55, Germ=C3=A1n Diago <germandiago@gmail.com> wrote:
> My concern is the following. If there are no rules yet, because they find=
 it
> too difficult,
> I don't know why they don't fix the language directly with the following
> proposition:
> - Constexpr should be used only when calling a function. Functions should
> not be annotated with constexpr.

See
https://groups.google.com/a/isocpp.org/d/msg/std-proposals/nxP9zixxFmY/yXnw=
RgKM2g0J

--=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: =?UTF-8?Q?Germ=C3=A1n_Diago?= <germandiago@gmail.com>
Date: Wed, 22 Oct 2014 19:16:16 -0700 (PDT)
Raw View
------=_Part_142_1870239245.1414030576606
Content-Type: text/plain; charset=UTF-8

@Geoffrey Romer Thanks for the explanation, it does make a lot of sense,
however, see
below for my only remaining question if you have a good reply for that.


See
>
> https://groups.google.com/a/isocpp.org/d/msg/std-proposals/nxP9zixxFmY/yXnwRgKM2g0J
>

Thanks for the info. Useful, makes sense, the only thing I still wonder:

- Why the D programming language does this non-intrusively? It is fair to
ask that I guess, because for them it is working.
Do they have the same potential problems as described in this thread?

--

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

<div dir=3D"ltr">@<span class=3D"_username" style=3D"white-space: nowrap;">=
<span class=3D"GBT2DCHDK-B">Geoffrey Romer <span style=3D"font-weight: norm=
al;">Thanks for the explanation, it does make a lot of sense, however, see&=
nbsp;</span></span></span><div><span style=3D"white-space: nowrap;">below f=
or my only remaining question if you have a good reply for that.<br></span>=
<div><span style=3D"white-space: nowrap;">&nbsp;</span><br><br><blockquote =
class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1p=
x #ccc solid;padding-left: 1ex;">See
<br><a href=3D"https://groups.google.com/a/isocpp.org/d/msg/std-proposals/n=
xP9zixxFmY/yXnwRgKM2g0J" target=3D"_blank" onmousedown=3D"this.href=3D'http=
s://groups.google.com/a/isocpp.org/d/msg/std-proposals/nxP9zixxFmY/yXnwRgKM=
2g0J';return true;" onclick=3D"this.href=3D'https://groups.google.com/a/iso=
cpp.org/d/msg/std-proposals/nxP9zixxFmY/yXnwRgKM2g0J';return true;">https:/=
/groups.google.com/a/<wbr>isocpp.org/d/msg/std-<wbr>proposals/nxP9zixxFmY/<=
wbr>yXnwRgKM2g0J</a>
<br></blockquote><div><br></div><div>Thanks for the info. Useful, makes sen=
se, the only thing I still wonder:</div><div><br></div><div>- Why the D pro=
gramming language does this non-intrusively? It is fair to ask that I guess=
, because for them it is working.</div><div>Do they have the same potential=
 problems as described in this thread?&nbsp;<br></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 />

------=_Part_142_1870239245.1414030576606--

.


Author: "'Geoffrey Romer' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 22 Oct 2014 19:29:05 -0700
Raw View
--001a11c12aa609a0b805060dd41f
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Sorry, I have no idea. I'm not familiar with D.
On Oct 22, 2014 7:16 PM, "Germ=C3=A1n Diago" <germandiago@gmail.com> wrote:

> @Geoffrey Romer Thanks for the explanation, it does make a lot of sense,
> however, see
> below for my only remaining question if you have a good reply for that.
>
>
> See
>> https://groups.google.com/a/isocpp.org/d/msg/std-proposals/nxP9zixxFmY/
>> yXnwRgKM2g0J
>>
>
> Thanks for the info. Useful, makes sense, the only thing I still wonder:
>
> - Why the D programming language does this non-intrusively? It is fair to
> ask that I guess, because for them it is working.
> Do they have the same potential problems as described in this thread?
>
> --
>
> ---
> 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/.

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

<p dir=3D"ltr">Sorry, I have no idea. I&#39;m not familiar with D.</p>
<div class=3D"gmail_quote">On Oct 22, 2014 7:16 PM, &quot;Germ=C3=A1n Diago=
&quot; &lt;<a href=3D"mailto:germandiago@gmail.com">germandiago@gmail.com</=
a>&gt; wrote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div d=
ir=3D"ltr">@<span style=3D"white-space:nowrap"><span>Geoffrey Romer <span s=
tyle=3D"font-weight:normal">Thanks for the explanation, it does make a lot =
of sense, however, see=C2=A0</span></span></span><div><span style=3D"white-=
space:nowrap">below for my only remaining question if you have a good reply=
 for that.<br></span><div><span style=3D"white-space:nowrap">=C2=A0</span><=
br><br><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8e=
x;border-left:1px #ccc solid;padding-left:1ex">See
<br><a href=3D"https://groups.google.com/a/isocpp.org/d/msg/std-proposals/n=
xP9zixxFmY/yXnwRgKM2g0J" target=3D"_blank">https://groups.google.com/a/<u><=
/u>isocpp.org/d/msg/std-<u></u>proposals/nxP9zixxFmY/<u></u>yXnwRgKM2g0J</a=
>
<br></blockquote><div><br></div><div>Thanks for the info. Useful, makes sen=
se, the only thing I still wonder:</div><div><br></div><div>- Why the D pro=
gramming language does this non-intrusively? It is fair to ask that I guess=
, because for them it is working.</div><div>Do they have the same potential=
 problems as described in this thread?=C2=A0<br></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" 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>
</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 />

--001a11c12aa609a0b805060dd41f--

.


Author: rhalbersma@gmail.com
Date: Thu, 23 Oct 2014 00:41:36 -0700 (PDT)
Raw View
------=_Part_372_1130136411.1414050096697
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Thursday, October 23, 2014 4:16:16 AM UTC+2, Germ=C3=A1n Diago wrote:
>
> @Geoffrey Romer Thanks for the explanation, it does make a lot of sense,=
=20
> however, see=20
> below for my only remaining question if you have a good reply for that.
> =20
>
> See=20
>>
>> https://groups.google.com/a/isocpp.org/d/msg/std-proposals/nxP9zixxFmY/y=
XnwRgKM2g0J=20
>>
>
> Thanks for the info. Useful, makes sense, the only thing I still wonder:
>
> - Why the D programming language does this non-intrusively? It is fair to=
=20
> ask that I guess, because for them it is working.
> Do they have the same potential problems as described in this thread?=20
>

See this 2007 thread: http://goo.gl/a7P4CK and look for postings by Walter=
=20
Bright. IIRC, one difference is that D does not do dynamic initializations=
=20
of static variables, and that somehow removes the need for a separate=20
constexpr keyword.=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_372_1130136411.1414050096697
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Thursday, October 23, 2014 4:16:16 AM UTC+2, Germ=C3=A1=
n Diago wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
>@<span style=3D"white-space:nowrap"><span>Geoffrey Romer <span style=3D"fo=
nt-weight:normal">Thanks for the explanation, it does make a lot of sense, =
however, see&nbsp;</span></span></span><div><span style=3D"white-space:nowr=
ap">below for my only remaining question if you have a good reply for that.=
<br></span><div><span style=3D"white-space:nowrap">&nbsp;</span><br><br><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-l=
eft:1px #ccc solid;padding-left:1ex">See
<br><a href=3D"https://groups.google.com/a/isocpp.org/d/msg/std-proposals/n=
xP9zixxFmY/yXnwRgKM2g0J" target=3D"_blank" onmousedown=3D"this.href=3D'http=
s://groups.google.com/a/isocpp.org/d/msg/std-proposals/nxP9zixxFmY/yXnwRgKM=
2g0J';return true;" onclick=3D"this.href=3D'https://groups.google.com/a/iso=
cpp.org/d/msg/std-proposals/nxP9zixxFmY/yXnwRgKM2g0J';return true;">https:/=
/groups.google.com/a/<wbr>isocpp.org/d/msg/std-<wbr>proposals/nxP9zixxFmY/<=
wbr>yXnwRgKM2g0J</a>
<br></blockquote><div><br></div><div>Thanks for the info. Useful, makes sen=
se, the only thing I still wonder:</div><div><br></div><div>- Why the D pro=
gramming language does this non-intrusively? It is fair to ask that I guess=
, because for them it is working.</div><div>Do they have the same potential=
 problems as described in this thread?&nbsp;<br></div></div></div></div></b=
lockquote><div><br></div><div>See this 2007 thread: http://goo.gl/a7P4CK an=
d look for postings by Walter Bright. IIRC, one difference is that D does n=
ot do dynamic initializations of static variables, and that somehow removes=
 the need for a separate constexpr keyword.&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_372_1130136411.1414050096697--

.


Author: =?UTF-8?Q?Germ=C3=A1n_Diago?= <germandiago@gmail.com>
Date: Thu, 23 Oct 2014 21:51:13 -0700 (PDT)
Raw View
------=_Part_994_1460689103.1414126273078
Content-Type: text/plain; charset=UTF-8


>
>
>>
> See this 2007 thread: http://goo.gl/a7P4CK and look for postings by
> Walter Bright. IIRC, one difference is that D does not do dynamic
> initializations of static variables, and that somehow removes the need for
> a separate constexpr keyword.
>

Thanks, that replies my last question.


:(((( I want that feature, it would enable, essentially, that I can embed
interpreters in metaprograms reusing the code written by others. The
alternatives are:

1. modify source from others.
2. rewrite interpreter :(

I have the intention of integrating in a toolchain some way of compile-time
interpretation, this way I can have the benefits of runtime development,
dynamically, like live coding. When done: just put that into the source
directly, compile to make it work really fast. So I would have the best of
both worlds.


--

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

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div><div=
><br></div></div></div></div></blockquote><div><br></div><div>See this 2007=
 thread: <a href=3D"http://goo.gl/a7P4CK" target=3D"_blank" onmousedown=3D"=
this.href=3D'http://goo.gl/a7P4CK';return true;" onclick=3D"this.href=3D'ht=
tp://goo.gl/a7P4CK';return true;">http://goo.gl/a7P4CK</a> and look for pos=
tings by Walter Bright. IIRC, one difference is that D does not do dynamic =
initializations of static variables, and that somehow removes the need for =
a separate constexpr keyword.&nbsp;</div></div></blockquote><div><br></div>=
<div>Thanks, that replies my last question.</div><div><br></div><div><br></=
div><div>:(((( I want that feature, it would enable, essentially, that I ca=
n embed interpreters in metaprograms reusing the code written by others. Th=
e alternatives are:&nbsp;</div><div><br></div><div>1. modify source from ot=
hers.&nbsp;</div><div>2. rewrite interpreter :(</div><div><br></div><div>I =
have the intention of integrating in a toolchain some way of compile-time i=
nterpretation, this way I can have the benefits of runtime development, dyn=
amically, like live coding. When done: just put that into the source direct=
ly, compile to make it work really fast. So I would have the best of both w=
orlds.</div><div><br></div><div><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&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_994_1460689103.1414126273078--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Fri, 24 Oct 2014 13:19:37 -0400
Raw View
--089e0112c588b6f89b05062e623e
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 22, 2014 at 10:16 PM, Germ=C3=A1n Diago <germandiago@gmail.com>
wrote:

> @Geoffrey Romer Thanks for the explanation, it does make a lot of sense,
> however, see
> below for my only remaining question if you have a good reply for that.
>
>
> See
>> https://groups.google.com/a/isocpp.org/d/msg/std-proposals/nxP9zixxFmY/
>> yXnwRgKM2g0J
>>
>
> Thanks for the info. Useful, makes sense, the only thing I still wonder:
>
> - Why the D programming language does this non-intrusively? It is fair to
> ask that I guess, because for them it is working.
> Do they have the same potential problems as described in this thread?
>
>
I *think* one difference is that D doesn't have (or is striving not to
have)  a "constexpr subset of the language" - ie the whole language is
constexpr-able.  So you will never have the problem of "oops I made this
function no longer constexpr-able, and broke my interface contract".


Tony

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

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

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Wed, Oct 22, 2014 at 10:16 PM, Germ=C3=A1n Diago <span dir=3D"ltr">&=
lt;<a href=3D"mailto:germandiago@gmail.com" target=3D"_blank">germandiago@g=
mail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex"><div dir=3D"ltr">@<span style=3D"white-space:nowrap"><span>Geoff=
rey Romer <span style=3D"font-weight:normal">Thanks for the explanation, it=
 does make a lot of sense, however, see=C2=A0</span></span></span><div><spa=
n style=3D"white-space:nowrap">below for my only remaining question if you =
have a good reply for that.<br></span><div><span style=3D"white-space:nowra=
p">=C2=A0</span><br><br><blockquote class=3D"gmail_quote" style=3D"margin:0=
px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">S=
ee
<br><a href=3D"https://groups.google.com/a/isocpp.org/d/msg/std-proposals/n=
xP9zixxFmY/yXnwRgKM2g0J" target=3D"_blank">https://groups.google.com/a/<u><=
/u>isocpp.org/d/msg/std-<u></u>proposals/nxP9zixxFmY/<u></u>yXnwRgKM2g0J</a=
>
<br></blockquote><div><br></div><div>Thanks for the info. Useful, makes sen=
se, the only thing I still wonder:</div><div><br></div><div>- Why the D pro=
gramming language does this non-intrusively? It is fair to ask that I guess=
, because for them it is working.</div><div>Do they have the same potential=
 problems as described in this thread?=C2=A0<br></div></div></div></div><di=
v class=3D""><div class=3D"h5">

<p></p></div></div></blockquote><div><br></div><div>I *think* one differenc=
e is that D doesn&#39;t have (or is striving not to have)=C2=A0 a &quot;con=
stexpr subset of the language&quot; - ie the whole language is constexpr-ab=
le.=C2=A0 So you will never have the problem of &quot;oops I made this func=
tion no longer constexpr-able, and broke my interface contract&quot;.<br><b=
r></div><div>=C2=A0<br></div></div>Tony<br><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&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 />

--089e0112c588b6f89b05062e623e--

.