On Tue, Jun 16, 2020 at 6:16 PM Paul Sokolovsky <pmis...@gmail.com> wrote:
> There's a reason why even projects otherwise largely written in Python,
> use a different language (like JavaScript) when they need
> easy-for-users scripting capabilities. A random example is
> https://github.com/frida/frida . That's because such projects want to
> let their users write one-liners like:
>
> for_each_kaboom(function (kaboom) {print("here's kaboom", saboom);
> for (sub in kaboom) print(sub); })
>

Actually there's another and a very important reason, unrelated to
syntax. You can put untrusted code into a JS sandbox and expect it to
be safe, but you can't easily sandbox Python code (especially not
inside other Python code). That doesn't mean that JS is inherently
better than Python; it just means that JS is the correct tool for that
job.

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/SRUHIE3NPBKRDCTFV7LH6VRLHJ24JDE3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to