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.
Comment on Java at 30: How a language designed for a failed gadget became a global powerhouse
kescusay@lemmy.world 10 months agoPython 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.
rottingleaf@lemmy.world 10 months ago
TerHu@lemm.ee 10 months ago
use bython, python with braces XD
kescusay@lemmy.world 10 months ago
Hasn’t been updated since 2018. Does it still work?
TerHu@lemm.ee 10 months ago
i honestly don’t know. i’ve read about it here and there but never actually tried it
masterspace@lemmy.ca 10 months ago
Most overrated language imho. I actually enjoy Java more.
LedgeDrop@lemm.ee 10 months ago
Preach it! 🙌⛪
sugar_in_your_tea@sh.itjust.works 10 months ago
You can annotate types in Python, and it’s actually pretty nice when used with Pyright/Pylance.
JackbyDev@programming.dev 10 months ago
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.
sugar_in_your_tea@sh.itjust.works 10 months 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.
kescusay@lemmy.world 10 months ago
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.
sugar_in_your_tea@sh.itjust.works 10 months ago
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#.
kescusay@lemmy.world 10 months ago
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.
Enkimaru@lemmy.world 10 months ago
Try ‘Nim’. It is Pythonic language with static typing.