23

Every industry is full of technical hills that people plant their flag on. What is yours?

you are viewing a single comment's thread
view the rest of the comments
[-] PeriodicallyPedantic@lemmy.ca 6 points 1 week ago

Dynamic typing sucks.

Type corrosion is fine, structural typing is fine, but the compiler should be able to tell if types are compatible at compile time.

[-] Nibodhika@lemmy.world 3 points 1 week ago

This is one of those things like a trick picture where you can't see it until you do, and then you can't unsee it.

I started with C/C++ so typing was static, and I never thought about it too much. Then when I started with Python I loved the dynamic typing, until it started to cause problems and typing hints weren't a thing back then. Now it's one of my largest annoyances with Python.

A similar one is None type, seems like a great idea, until it's not, Rust solution is much, much better. Similar for error handling, although I feel less strongly about this one.

[-] hawgietonight@lemmy.world 1 points 1 week ago

I usually take these holiday weeks off to learn a new language or framework, and started to take a peek into Python, I had it on the back burner way too long. Got to the dynamic variable types and my heart sunk... I couldn't continue.

Maybe I should take a third attempt at Rust.

[-] Nibodhika@lemmy.world 1 points 1 week ago

Honestly modern python is not that bad because of the typing hints and checks you can run on them nowadays. Also it's worth noting that python has very strong types, so it's not illy willy magical types, and while it is possible to use it like that it's normally not encouraged (unlike other languages).

That being said, if you haven't learnt Rust I strongly encourage you to read the book and go through the rustling exercises. Honestly while still a new and relatively nieche language, it fixes so many of the issues that exist in other languages that I think it will slowly take over everything. Sure. It's slower to write, but you avoid so much hassle on maintenance afterwards.

[-] RouxBru@lemmy.world 1 points 1 week ago

Coming from a background where all the datatypes are fixed and static (C, PLCs) it took me so very long to get used to python's willy nilly variables where everything just kinda goes, until it doesn't. Then it breaks, but would've been fine if we just damn knew what these variables where

Now my brain just goes "it's all just strings"

[-] petersr@lemmy.world 1 points 1 week ago
[-] JackbyDev@programming.dev 0 points 1 week ago

From my perspective, dynamic typing IS type corrosion!

[-] Nibodhika@lemmy.world 0 points 1 week ago

No it's not, they're completely different concepts. In C/C++ lingo Dynamic typing is having every variable be a void * whereas type coercion is implementing conversion functions for your types to allow casting between types, e.g. having a temperature class that can be casted to a double (or from it).

This is a function with dynamic typing and no type coercion in C/C++:

int foo(void* param) {
  Temperature* t = (Temperature*) param;
   return t->intValue() + 10;
}

This is the same function with type coercion and no dynamic typing in C/C++:

int foo(Temperature& t) {
  return t + 10;
}
[-] JackbyDev@programming.dev 1 points 1 week ago

I'm making a Star Wars joke based on a typo. I know what type coercion is. The joke is that dynamic typing is corroded and disgusting to me. The Star Wars reference being Anakin saying from his perspective the Jedi were evil.

[-] ThomasWilliams@lemmy.world -2 points 1 week ago

Its not possible to have objects that are statically typed.

[-] Nibodhika@lemmy.world 3 points 1 week ago

What are you talking about? What do you think C/C++/Rust/Java do?

this post was submitted on 18 Dec 2025
23 points (96.0% liked)

Ask Lemmy

36292 readers
386 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS