On Sun, Jul 17, 2011 at 11:39 AM, Matt S Trout <mst@shadowcat.co.uk> wrote: > Oh, and I'd be totally happy with two arg being introduced. > But *later*. Because in my experience most newbies read just > far enough to get *an* open to work, and then just keep on > using the first one they saw. > > In fact, the only exploit of a piece of code I wrote that I > know of was because *I* stopped reading too soon and ended > up with an unsafe 2 arg open. > > We recommend everybody does 'use strict' by default because > it helps protect us from ourselves. The same applies to 3 > arg open, especially in a tutorial document aimed at newbies > who don't yet know enough to know when they're about to > shoot themselves in the face. I agree. I've seen 2-arg open cause enough bugs (like this one: https://rt.cpan.org/Ticket/Display.html?id=64504), I'd rather explain them to use 3-args by default than explain when 2-args is safe and when it isn't. LeonThread Previous | Thread Next