Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python has really poor support for compiled extensions. I know this sounds weird to say, given that they are used everywhere, but this is the number one pain point in Python. It’s really awkward to say, develop on Mac and deploy on Linux.


Might I ask what scripting-like language does have good support for compiled extensions? Such that you can easily develop on Mac and deploy on Linux?

Because it seems to me that once you compile something you are in the awkward world of ABI and CPU differences. And binary portability has been a paint point of programmers since before I was born (and I'm not that young).

So if there is a programming language that neatly gets around this problem, me and a lot of other folks would really like to know about it.


C# does. It's not exactly a scripting language and authoring a native dependency NuGet package isn't exactly an obvious task, but when you learn how, it's a straighforward solution:

- a NuGet package with native deps (win, linux, osx) cross join (x86, arm) - a P/Invoke package that depends on the native one - actual software that uses the dependency

When you publish the actual software, it pulls the deps and includes the correct native build.


F# by extension has this. It’s a pretty good scripting language although not perfect.


That's a characteristic of the language you write the extension in, not Python.

E.G, if you use, rust, through maturin, cross platform compilation is pretty decent: https://www.maturin.rs/distribution.html


I’m talking about the ecosystem. I was unable to get a small Python project with some mainstream native libraries to compile for Linux on a macOS host without Docker.

This works far better in Rust, for example.

Of course if Python wasn’t so dog slow we wouldn’t need so many native packages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: