Cpython to Step Over Javascript in Developing Web Applications

Cpython to Step Over Javascript in Developing Web Applications
Published on

CPython is still in its experimental stage, but who knows what utility one might find striking

Python, a programming language is no doubt making waves for its simple syntax and easy-to-execute code, which is much faster than other programming languages. But when it comes to Web development or web application development, it is JavaScript's court.  Now, this scenario might be upending for change. CPython, short for Core Python, a reference implementation that other Python distributions are derived from, is in the docks. The recently released CPython on WASM project, developed by Ethan Smith, a Berkeley-based software developer is about a Python language written in C meant for developing web applications.

In fact, running Python code on a web browser can be achieved in a roundabout manner. There are many ways of doing it. The easiest one is to run the Python on the server and pipe out the output via a WebSocket or rewrite python in JavaScript. Converting a code in this manner would end up in transpiring with unnecessarily long and complicated code and a brigade of security bugs. So, can CPython run on any and every browser? As per a report by the Register magazine, CPython is developed only as a use case that can run on only Web assembly/WASM. Webassembly is chosen because it can deliver near-native performance allowing for cross-platform web applications and creating performance-sensitive code which JavaScript is least equipped with. This is significantly a critical development as Python has its host of issues with installation, managing the virtual environment, and reducing dependency, hindering its scope in web application development.

CPython's inherited survival instincts

CPython is a descendant of Pyscript built on Pyodide, a port of CPython, or a Python distribution for the browser and Node.js that is based on Webassembly and Emscripten. Pyodide, which was developed to run Python code for Mozilla is proving to be good at handling Python's scientific stack including Numpy, Pandas, Matplotlib, SciPy, and Scikitlearn, etc. which JavaScript is not equipped with for in-browser analytical computations. Besides, Pyodide gives the developer a standard Python interpreter, that runs completely in the browser, with full access to Web APIs. After Pyodide's release, many have wondered if Python is being stretched too far into data science. If you leave this question to time, its progress as an in-browser compiler is a clear sign of hope for the survival of Cpython.

Is CPython a threat to JavaScript?

It is not the first time that a programming language is looked upon as a threat to JavaScript. Languages like C#, Brython, and Blazor have been here within the web developers' reach; however, couldn't go long to become dependable mainstream languages. As Ethan Smith hopes, his brainchild CPython might be successful in bringing Python to the web interface expanding its scope with increased ease of integration, unlike its predecessors. It is still in its experimental stage but who knows what utility one might find striking. Consider WebAssembly's popularity for running malware, particularly for hidden crypto mining of website visitors.

Join our WhatsApp Channel to get the latest news, exclusives and videos on WhatsApp

                                                                                                       _____________                                             

Disclaimer: Analytics Insight does not provide financial advice or guidance. Also note that the cryptocurrencies mentioned/listed on the website could potentially be scams, i.e. designed to induce you to invest financial resources that may be lost forever and not be recoverable once investments are made. You are responsible for conducting your own research (DYOR) before making any investments. Read more here.

Related Stories

No stories found.
logo
Analytics Insight
www.analyticsinsight.net