DEV Community

Discussion on: The Peregrine programming language - A Python-like language that's as fast as C.

Collapse
 
_hs_ profile image
HS • Edited

Given the idea that Python is cross-platform - in the idea where you use Python libs for your own code, how does this compare? I know Python and other languages as well use libraries written in C or Rust or such, then just make interface for such calls which again makes code unusable on some platforms where those dependencies weren't "ported". So I assume you would still have to compile this for each platform you want to run on? The only difference being that now you could write everything in one language and use source includes then recompile everything together where Python libs written for a specific platform "cannot" do this because they pre-compiled for single platform. It's really niche experience and not many libs are like that but still I'm wondering

Collapse
 
saptakbhoumik profile image
SaptakBhoumik

Well the library that run on a single platform in python will run on a single platform on swallow as well

Collapse
 
_hs_ profile image
HS

I was wondering more about cross-compile issues with the same language, not using Python lib in Swallow. As text clearly points out is that you may now be able to avoid Python libraries written in other languages for speed and then having interface to Python and instead simply have libraries fully written in same language as the code you're writing yourself. Point being you can write Python application and move it's code anyplace without thinking about platform unless you depend on such libraries. If swallow will have to be compiled each time for platform then it looses that perspective. Note that not all Python apps are written to use AI stuff or something depending on heavy calculations so they don't care about this and enjoy "write once move anywhere" to some extent. Again not saying it's preventable in all cases but if you completely loose that part of the Python then you loose specific group of devs.