this post was submitted on 30 Jan 2025
330 points (100.0% liked)

Programmer Humor

22781 readers
984 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
330
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 

Have to add that we work exclusively in strongly-typed languages. Kinda want to see how it plays out, but I can't help but argue with him, so I think I'll just go.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 2 months ago (13 children)

I recently tried out Python. I had no idea it still doesn't have runtime enforced typing...

I didn't realize that PHP was decades ahead of it.

[–] [email protected] 28 points 2 months ago* (last edited 2 months ago) (5 children)

Python 3.x will never have static typing because that would break backwards compatibility.

However, typing hints have been Integrated into Python for a while, and you are heavily recommended to use them, so your IDE can enforce typing.

[–] [email protected] 3 points 2 months ago (3 children)

Considering there is typing in the code why is there no switch to enable type checking at runtime? PHP does this with a per file declare(strict_types) - why would python be unable to have either a global or per file flag to enable checks?

[–] [email protected] 2 points 2 months ago* (last edited 2 months ago)

why is there no switch to enable type checking at runtime?

Have you got problems this would solve? I've done a lot of type annotated Python at scale and I can't think of an example.

Edit: given nobody in their right mind allows code that's not checker clean.

load more comments (2 replies)
load more comments (3 replies)
load more comments (10 replies)