37
you are viewing a single comment's thread
view the rest of the comments
[-] tal@lemmy.today 3 points 1 day ago* (last edited 1 day ago)

By the popularity of type inference in variable declarations, a feature that’s included in most languages now: var in C# and Java, := in Go, auto in C++, and so on.

I don't really like type inference, because I think that it makes it more-obnoxious to read code. That being said, I will concede that if you want a lot of static type information


and compilers can do things with more information


it does make for more concise code.

EDIT: Hmm. I was trying to think what would make it better. Maybe I'd be more okay with it if all compilers for languages that did this had a trivial way to just run the type inference step and output code with inferred types present.

this post was submitted on 26 Jul 2026
37 points (72.8% liked)

Technology

86651 readers
4047 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 3 years ago
MODERATORS