r/learnprogramming • • Apr 05 '22

Name one programming/comp sci concept you never understood and if you understand it, try to explain it to them

Name a programming concept such as virtual functions, pointers, certain algorithms, etc that you always had a hard time understanding and why.

Someone else who reads yours and does understand it, try to explain it to them to help them learn

1.6k Upvotes

738 comments sorted by

View all comments

14

u/Sedowa Apr 05 '22

I'm reading through stuff about virtual functions and class pointers to them and I've found I just don't understand why it has to be so complicated. Seems it would be a lot easier to just avoid using them and code around it but maybe there's a performance reason for it.

Same with lambda functions. It was explained to me as being a function that just gets run once so doesn't need a fancy definition but seems to mostly just make readability harder for not a lot of gain. Once again this could just be a performance thing and maybe it helps with larger applications rather than the smaller ones used in teaching material.

It's hard to wrap my mind around the point of it all.