<div dir="ltr">From that page: <div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">User-defined literals are basically normal function calls with a fancy syntax. [...] While user defined literals look very neat, they are not much more than syntactic sugar. There is not much difference between defining and calling a literal operator with "foo"_bar and doing the same with an ordinary function as bar("foo"). In theory, we could write literal operators that have side effects and do anything we want, like a normal function.</blockquote><div><br></div><div>Obviously the arbitrary-function-part of that will never happen in Python (yes?)</div><div><br></div><div>Also, for discussion, remember to make the distinction between 'units' (amps, meters, seconds) and 'prefixes' (micro, milli, kilo, mega). Right away from comments, it seems 1_m could look like 1 meter to some, or 0.001 to others. Typically when I need to enter very small/large literals, I'll use "engineering" SI notation (powers divisible by 3 that correspond to the prefixes): 0.1e-9 = 0.1 micro____.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 29, 2016 at 12:20 AM, Ryan Birmingham <span dir="ltr"><<a href="mailto:rainventions@gmail.com" target="_blank">rainventions@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'd certainly be interested in hearing about how this has worked with C++, but this would certainly make scientific code less easy to misuse due to unclear units.</div><div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_1576195088147125396gmail_signature" data-smartmail="gmail_signature">-Ryan Birmingham<br></div></div></font></span><div><div class="h5">
<br><div class="gmail_quote">On 28 October 2016 at 16:45, Sven R. Kunze <span dir="ltr"><<a href="mailto:srkunze@mail.de" target="_blank">srkunze@mail.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 28.10.2016 22:06, MRAB wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2016-08-26 13:47, Steven D'Aprano wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ken has made what I consider a very reasonable suggestion, to introduce<br>
SI prefixes to Python syntax for numbers. For example, typing 1K will be<br>
equivalent to 1000.<br>
<br>
</blockquote>
Just for the record, this is what you can now do in C++:<br>
<br>
User-Defined Literals<br>
<a href="http://arne-mertz.de/2016/10/modern-c-features-user-defined-literals/" rel="noreferrer" target="_blank">http://arne-mertz.de/2016/10/m<wbr>odern-c-features-user-defined-<wbr>literals/</a><br>
</blockquote>
<br></span>
Nice to hear. :)<br>
<br>
They now have 5 years of experience with that. Are there any surveys, experience reports, etc.?<br>
<br>
<br>
Cheers,<br>
Sven<div class="m_1576195088147125396HOEnZb"><div class="m_1576195088147125396h5"><br>
<br>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofco<wbr>nduct/</a><br>
</div></div></blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br></blockquote></div><br></div>