88
submitted 8 months ago by [email protected] to c/[email protected]

So, this uses a macro, but if you're thinking anything is possible with a macro, it's actually not in Rust. The input does still need to parse as valid Rust tokens.

Which means the authors asked themselves at some point: Is the Rust syntax a superset of the Python syntax?
And well, it's not. In particular, some Python keywords will just be tokenized as an identifier (like a variable name).

But it is close enough that the authors decided against requiring a massive string to be passed in, which does amuse me. 🙃

you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 33 points 8 months ago

Personally, I can’t wait to inline PHP in my rust code!

[-] [email protected] 15 points 8 months ago

Better yet inline PHP inside the inline python in your rust code

this post was submitted on 16 Oct 2024
88 points (100.0% liked)

Programmer Humor

36623 readers
222 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS