On 24 July 2014 19:13, Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote: > * Rafael Garcia-Suarez <rgs@consttype.org> [2014-07-24T11:51:40] >> I believe that this was discussed here some years ago, and that this >> was suggested by TomC. Anyway, I pushed a patch on rgs/nomagicopen. >> The patch is incomplete as it lacks docs and tests. I welcome feedback >> on the intent of the feature. > > Gut reaction after 30s while sitting in a conference session: > > I like the feature, but I think it might be too small a change to pick up a new > operator. What about a pragma/feature? It's more syntactic sugar than new operator. That said, there are benefits and drawback in the 2 approaches. Con: The syntax is backward-compatible, so technically we don't *need* a new pragma to enable it. <<>> optimises for less verbosity. Pro: However on one-liners without a pragma we lack a way to transform the implicit while(<>) of -n or -p into a while(<<>>). Pro: A pragma could also disable the magic in eof() (the one with empty parentheses). So what would be a pragma name ? secure::open ? open::nomagic ?Thread Previous | Thread Next