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

Show parent comments

1

u/FountainsOfFluids Apr 05 '22

I haven't worked with namespaces since college.

Can you import a namespace to get all the tools gathered in it?

1

u/[deleted] Apr 06 '22

[removed] — view removed comment

1

u/FountainsOfFluids Apr 06 '22

That's cool.

I'm accustomed to static methods coming with packages that are also used as proper classes. The static methods are tools that are either needed or just helpful.

For example, in Mongoose each object is a data record, and you can execute methods on a record that affects only that record.

Static methods affect all data records. So if you were searching for all records that matched a certain term, you'd use the static method for querying.