[Python-ideas] SI scale factors alone, without units or dimensional analysis
Todd
toddrjen at gmail.com
Sat Oct 29 14:18:29 EDT 2016
On Sat, Oct 29, 2016 at 12:43 PM, Nick Timkovich <prometheus235 at gmail.com>
wrote:
> From that page:
>
>> 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.
>
>
> Obviously the arbitrary-function-part of that will never happen in Python
> (yes?)
>
>
>
Why not? It seems like that would solve a lot of use-cases. People get
bringing up various new uses for prefix or suffix syntax that they want
built directly into the language. Providing a generic way to implement
third-party prefixes or suffixes would save having to put all of these
directly into the language. And it opens up a lot of other potential
use-cases as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161029/7ade2046/attachment.html>
More information about the Python-ideas
mailing list