this post was submitted on 31 May 2025
357 points (95.9% liked)

Technology

70716 readers
4229 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 67 points 5 days ago (6 children)

Python is easy, but it can also be infuriating. Every time I use it, I'm reminded how much I loathe the use of whitespace to define blocks, and I really miss the straightforward type annotations of strong, non-dynamically typed languages.

[–] [email protected] 31 points 4 days ago

Most overrated language imho. I actually enjoy Java more.

[–] [email protected] 15 points 4 days ago (2 children)

You can annotate types in Python, and it's actually pretty nice when used with Pyright/Pylance.

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

Oh, I know you can, but it's optional and the syntax is kind of weird. I prefer languages that are strongly typed from the ground up and enforce it.

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

Python is strongly typed, it's just not statically typed. Python with consistent type hinting is extremely similar to a statically typed language like C#.

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

I would argue that without consistent and enforced type hinting, dynamically typed languages offer very little benefit from type-checking at runtime. And with consistent, enforced type hinting, they might as well be considered actual statically typed languages.

Don't get me wrong, that's a good thing. Properly configured Python development environments basically give you both, even if I'm not a fan of the syntax.

[–] [email protected] 0 points 3 days ago

What's wrong with the syntax? It's just var_name: Type = value, it's very similar to Go or Rust. Things get a little wonky with generics (list[Type] or dict[Type]), but it's still similar to other languages.

One nice thing about it being runtime checked is you can accept union types, def func(param: int | float), which isn't very common in statically typed languages.

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

But nobody else does, and I need it more on code I am consuming than producing. In fact, many functions rely on being able to send various types for different behavior. Dynamic programming is crazy to me. It's like guessing. I don't know what type your code is accepting and I have to guess based on the name of read your code directly.

[–] [email protected] 1 points 3 days ago

I have the opposite experience, a ton of libraries I use provide optional types, and the handful that don't often have a good reason for it (e.g. numpy). Our projects at work have types almost everywhere, and it's pretty nice to work with.

[–] [email protected] 1 points 3 days ago

Try 'Nim'. It is Pythonic language with static typing.

[–] [email protected] 1 points 4 days ago

I hated something about Python, and avoided it, until encountering Tcl which for me fulfills the same role that Pythons seems for many people, but Tcl is really much more pleasant. IMHO.

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

use bython, python with braces XD

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

Hasn't been updated since 2018. Does it still work?

[–] [email protected] 1 points 3 days ago

i honestly don’t know. i’ve read about it here and there but never actually tried it

[–] [email protected] 1 points 4 days ago

Preach it! 🙌⛪