393
(page 2) 47 comments
sorted by: hot top controversial new old
[-] JoYo@lemmy.ml 4 points 5 months ago

C++ classes are fairly optional but if you're already using cpp then it likely wasn't your choice and neither will the choice of OOP.

[-] Buddahriffic@lemmy.world 2 points 5 months ago

Yeah, I like the sweet spot that C++ is in. It can do anything C can but then you have classes and STL and all that on top of it.

[-] JoYo@lemmy.ml 2 points 5 months ago

once i learned about defer it became a hard requirement. cpp kinda gives me that but other c like languages do it better.

[-] Buddahriffic@lemmy.world 2 points 5 months ago

Yeah, I wish C++ had function/scope epilogs and labeled loops/breaks, too. Those are the cases where the "never use goto" rule can be broken to make better code than adding all of the code that would be required to handle it the "right" way (setting up early exit flags and if statements after each level of nested loop to check the flag).

[-] Magister@lemmy.world 3 points 5 months ago

I learnt Caml in the 90s at university, I was completely lost, in Prolog too.

[-] nul9o9@lemmy.world 3 points 5 months ago

Polymorphism just goes over my head.

[-] sparkle@lemm.ee 1 points 5 months ago* (last edited 5 months ago)

I like polymorphism. Having to have a hundred differently named functions or structs or something that do the same thing but slightly differently in Rust is annoying as hell. Especially with all the underscores you have to type... If Rust were more functional though it'd make that problem go away pretty quickly.

[-] kionite231@lemmy.ca 1 points 5 months ago

It's not that hard however I think it's absolutely useless and doesn't add any value to the code.

[-] aluminium@lemmy.world 2 points 5 months ago

Why typescript? It allows you to make typesafe compositions

[-] Dirk@lemmy.ml 1 points 5 months ago

OOP was a mistake!

load more comments
view more: ‹ prev next ›
this post was submitted on 30 May 2024
393 points (94.6% liked)

Programmer Humor

32448 readers
1001 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS