News for hackers. Stuff that matters.
Re:The memory safety problem isn't bad coders by jschwartzi on Tuesday February 12, 2019 @02:03PM (#19146411)
I try to avoid using STL because it A) throws exceptions, B) has really convoluted type names, and C) dynamically allocates memory. These are all things you avoid in the embedded space.
Re:The memory safety problem isn't bad coders by maxxxxx on Tuesday February 12, 2019 @02:22PM (#19146586)
Makes sense for embedded.
Re:The memory safety problem isn't bad coders by gowld on Tuesday February 12, 2019 @02:51PM (#19146870)
Any use of templates has the same problem, including templates that are used to generate highly efficient static constants and non-branching-at-runtime code.
Re:The memory safety problem isn't bad coders by llukas on Tuesday February 12, 2019 @03:15PM (#19147083)
Example?

Templates (template metaprogramming) help to avoid exceptions. You can check invariants first and jump into efficient code.