[Tutor] (Convergence && Divergence) || Nonsense

Mats Wichmann mats at wichmann.us
Sat Aug 20 18:53:10 EDT 2022


On 8/20/22 16:26, Alan Gauld via Tutor wrote:
> On 20/08/2022 19:31, avi.e.gross at gmail.com wrote:

>> Is Python likely to move into some areas like web browsers where JavaScript
>> is a major built-in with JAVA (completely unrelated) also has some ability
>> to be integrated? I heard somewhere they once tried to include some of
>> python in Mosaic but JavaScript sort of won that battle. 
> 
> Deveral languages, including Python, have gone down that route
> but Javascript is now almost alone in that area. The most
> succesful attempt to put Python inside a browser was, rather
> ironically, from Microsoft with their Windows Script Host engine
> which supported JScript and VBScript and Python within Internet
> Explorer. But with the death of WSH so died Python's life in
> a browser. (The all-Python Grail browser hardly counts.)

But PyScript probably does count.  Whether it will gain any *real*
traction, as opposed to curiosity, remains to be seen.  Since it's built
on WebAssembly, and all modern browsers support that, it's at least
capable of being usable everywhere - but will people see any actual need
to do that on a wide scale when Javascript already works so well for them?
As Alan goes on to say in the next bit...

>> So, aside from issues like getting everyone to change, is there anything
>> about Python that would be incompatible from being used in browsers either
>> instead of or alongside JavaScript and be able to access and manipulate the
>> DOM and other allowed services?
> 
> No, but why would you want to? Javascript is filling that
> space and the number of sites using it is vast (even my own
> humble web-page which is almost entirely static HTML uses
> a few script snippets). Any browser therefor must support
> Javacript, anything else is just added bloat with no
> established code base and no guarantee of one forming!

Because of WebAssembly being a W3C Recommendation, the bloat issue isn't
really that big when considering PyScript - or indeed other languages
being able to be used in web pages.

https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/

> It's a bit like trying to replace C in the low-level OS
> and device-driver realm. Rust is having a go at that but
> its a huge struggle. Rust is clearly a "better language"
> for modern computing but the legacy factor is a huge hurdle.

No question - when people have something that works, whether they like
it or not, there's not a huge incentive to switch: companies usually
have enough stuff to work on without rewriting things already deployed
that are proving useful.  There's still an awful lot of COBOL running in
production out there...



More information about the Tutor mailing list