3 ms·
I programmed in C++ a while back - I was given constant warnings about how pointers were dangerous and to treat them with respect. I followed the Qt habits and
by munk-a 3y ago
I programmed in C++ a while back - I was given constant warnings about how pointers were dangerous and to treat them with respect. I followed the Qt habits and primarily used references for everything - but there were problems I encountered that required[1] pointers and I went to those same people warning me about pointers and asked them how to use them - I expressed my hesitancy to do so and they calmly explained best practices and specific pitfalls. My code was good[2] and functioned safely - it was good and functioned safely because my knowledge sources, along with the warnings, were willing to share the dangerous knowledge. Refusing to educate people about dangerous things just means they'll wing it and be wonderful examples of why those things are dangerous.
If I asked Gemini about magic quotes in PHP[3] I'm fine with it explaining why that's a terrible idea - but it should also show me the safest path to utilize them.
1. Languages are turing complete - nothing is an absolute - etc... so "required" is a really strong word here and inaccurate - there were alternatives but they were much less elegant and clean.
2. -ish... I was a pretty junior developer at the time.
3. https://en.wikipedia.org/wiki/Magic_quotes https://en.wikipedia.org/wiki/Magic_quotes