On Sat, Oct 29, 2016 at 12:43 PM, Nick Timkovich <prometheus...@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.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to