Re: [RFC] session_start(), read_only, lazy_write; Take 2

From: Date: Thu, 27 Mar 2014 05:33:58 +0000
Subject: Re: [RFC] session_start(), read_only, lazy_write; Take 2
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-73449@lists.php.net to get a copy of this message
> This is only 1 example that's analogous to opening a session as read > only Is it, though? Vim's read-only mode prevents you from silently saving changes to the original file, but it does not prevent you from saving changes once you confirm them. Vim ro is like session_start( read_only = true ) and then something like session_write_close( confirm_write = true ) -- an extra arg that forces you to confirm the write but allows you to do it if you insist, without manually reopening. Of course interactive warnings and unattended code can't really be compared. But the "continue, if you're sure" experience of Vim ro surely isn't the "start over, you screwed up" expected from read_only = true. > If I didn't know already, when presented with the option for > "read_and_close" I would probably have a minor wtf moment but it > *would* make me read the docs to understand what exactly it means to > me if I use it, since it's an unconventional option name. I think that you've made a ringing endorsement of an explicit, unambiguous name. No robust language can seek to be self-explanatory, but it can aim for clear, complete documentation. This term has multiple meanings that are all "mainstream"; debate about THE meaning is fruitless. IMO. -- Sandy

« previous php.internals (#73449) next »