this post was submitted on 13 Nov 2023
101 points (92.4% liked)

Programming

17499 readers
9 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago (1 children)

If you pick Python, do you still get libraries written in C or Rust?

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (1 children)

Yeah, C libraries can be used in basically any mature language. It's just too useful to not have.

And Rust, since it doesn't need a runtime, can emulate the format of C libraries.
Rust libraries can also specifically target Python via https://pyo3.rs, but as I understand, this just does the C library format, plus a basic Python wrapper to make it nicer to use.

[–] [email protected] 4 points 1 year ago (1 children)

Sorry, I meant in the context of OPs question (so i guess up to them to set the rules). As in, you pick Python for the rest of your life, does that lock you out of C libraries? Its a bit of a rabbithole though, as many language runtimes would get excluded as well. There arent many languages that actually stand alone.

[–] [email protected] 3 points 1 year ago (1 children)

Ah, right, my interpretation is that as long as you don't need to touch the source code, you're good.

But yeah, it's certainly not as clear cut. My pick would actually be Rust, because you can use it for pretty much everything, including web frontends via WebAssembly.
However, in that case, you still write HTML+CSS, which technically may or may not be programming languages, and the DOM API is actually only documented in JavaScript. So, I wouldn't need to write JS, but would still want to read it...

[–] [email protected] 3 points 1 year ago (1 children)

Thats probably the best way to look at it, otherwise it gets very difficult very fast.

If markup languages are locked out, then rust has other problems, because you then can't change your cargo.toml file anymore.

And then there is the build script problem :/

As a thought excercise this has been interesting, there certainly are a lot of inter-dependencies between languages the deeper you look.

[–] [email protected] 2 points 1 year ago

Yeah, I found it quite interesting, too. To some degree, I've been wondering why it's so natural for programmers to be programming language polyglots, even if they're not actively nerds/excited about them.
And yeah, this discussion made me realize that you basically can't take a single step in programming without being confronted with multiple languages/syntaxes at once.