4 ms·
Perl introduced a "strict" mode a long time ago. Although it doesn't force it on you, virtually all modern Perl programmers use it by default. As an extra secu
by peterwwillis 10y ago
Perl introduced a "strict" mode a long time ago. Although it doesn't force it on you, virtually all modern Perl programmers use it by default.
As an extra security feature Perl also supports "taint" mode, which "taints" all user-supplied data as potentially hazardous to the program. This was used more for CGI, but it's still a simple and powerful security feature. Unfortunately, it was never adopted like 'use strict' was because it would more often get in the way of the programmer.
- Animats 10y ago"strict mode" is an assistance to migration. The fundamental memory safety problem in C is that arrays are not first-class objects. They degrade to pointers when passed around. Yet any function which references an array has to know how big it is. Somehow. The language has no syntax for this. That's the big problem, and what I was addressing.
- peterwwillis 10y agoI wasn't arguing your point. I'm saying it's been proven that some new optional functionality can be adopted slowly and eventually become de-facto standard. (And that it might not get adopted if it gets in a programmer's way)