|
|
|
|
|
by 01001
2934 days ago
|
|
As a C coder I find myself trampling over my own memory a lot. Say you have a pointer somewhere that points to a struct, and then once every 10 million iterations of a set of 20 functions that pointer gets written over by a string that lacks a NULL terminator occasionally. So your program crashes in a completely random place that has nothing to do with the origin of the bug. That's the problem with memory safety. But the lack of memory safety is also very powerful, you can malloc a chunk of memory and then use it in extremely creative ways, you really see some peoples genius shine when you read their source code, in a way that I haven't been able to see with other languages. |
|
It's the same with web programming. You always escape on the output, or just avoid escaping by using proper API (el.textContent = 'something').