On 7 February 2017 at 15:47, Thomas Kluyver <tho...@kluyver.me.uk> wrote:
> I've been thinking for a while about Python apps using Electron (Positron?
> ;-). It's an interesting idea from the Python side, but I struggle to come
> up with reasons why developing an Electron+Python app would be easier than
> developing a regular Electron app. I prefer writing Python to Javascript,
> but you'd need quite a bit of Javascript anyway, you don't have to care
> about browser compatibility, and there would inevitably be some extra
> friction in using two languages.
>
> I'm sure there are use cases where it makes sense, like if you use Python's
> scientific computing ecosystem. But I don't know how broad they are.

I'd say the rationale for Electron/Python apps is the same as that for
any JS frontend/Python backend configuration - JS/CSS/HTML5 is a great
suite of technologies for defining user interfaces, but you don't
necessarily want to be writing all your application logic in it. (You
certainly *can*, you just may not want to)

The trade-offs are different for client-side apps (since shipping two
different language runtimes is kinda horrible, given neither V8 nor
CPython is particularly lightweight), but it's not *that* different
from the traditional Python GUI app development model of depending on
a C/C++ toolkit like Tcl/Tk, Gtk, Qt, or wxWidgets.

It's just that the modern GUI toolkit is called V8, most of the actual
GUI bits are written in JavaScript rather than C/C++, and the language
independent in-process bindings got fairly dramatically worse along
the way :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
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