Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70995 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74229 invoked from network); 3 Jan 2014 23:11:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2014 23:11:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.53 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.53 mail-la0-f53.google.com Received: from [209.85.215.53] ([209.85.215.53:58214] helo=mail-la0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/00-08607-28347C25 for ; Fri, 03 Jan 2014 18:10:59 -0500 Received: by mail-la0-f53.google.com with SMTP id mc6so8584136lab.12 for ; Fri, 03 Jan 2014 15:10:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=gRx56JncI6Y2Dcz/K6o6ehgek7RjvBjMimkHR9vRQZ4=; b=Yeb8WnFRFkeDoAZ6+sm4JQVnd/MlOEd1sZdVcYZJD2ME0nu3rF45DDnx0m5jazM3lH HL9JD/E37kcEpHDiACWpQZQ0us2uzpc2yblzkn3LqFHWzM7+ttmDfA58BPDe1qK65+eT BnDqsyrPHRtCMlnkTYWL4WKuYg1ulriU7lBnAzxwyQy2ZuIASC1t2REUemWI+voVTpln +fhFBa2HGi2hdwX+F1nx+yfaafBDGgWFKTYDQ1FeWWAZj4JLG5G4Q3Q4gnNjbv2nxDJc 1v4IAo4wg4Gk+3Nz+zJhBewwwZV9PCU0meoj43e8TKAFyKpve7vTWmvAo9y3D067GT7o OgAw== X-Received: by 10.112.168.131 with SMTP id zw3mr54165lbb.85.1388790655016; Fri, 03 Jan 2014 15:10:55 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.6.68 with HTTP; Fri, 3 Jan 2014 15:10:14 -0800 (PST) In-Reply-To: <52C61F08.6020105@gmail.com> References: <52C61F08.6020105@gmail.com> Date: Sat, 4 Jan 2014 08:10:14 +0900 X-Google-Sender-Auth: nBIdDQ9iowl4636t8PK5DyVqYZE Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c344e2a8e52e04ef190539 Subject: Re: [PHP-DEV] Re: [RFC] Introduce session.lock, session.lazy_write and session.lazy_destory From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c344e2a8e52e04ef190539 Content-Type: text/plain; charset=UTF-8 Hi all, On Fri, Jan 3, 2014 at 11:23 AM, Rowan Collins wrote: > On 02/01/2014 20:46, Yasuo Ohgaki wrote: > >> I've added session_discard() to RFC that discards changes made to >> session data and close session. >> >> Since there is session_commit(), >> >> http://www.php.net/manual/en/function.session-commit.php >> >> session_abort() may be better name for it. >> Any comment? >> > > Since session_commit() is an alias for session_write_close(), the new > function should probably also have "close" in its name (although oddly we > "start" a session, rather than "open" it). > > Both "discard" and "abort" also sound a bit like destroying the session > itself to me, rather than just ignoring the current changes to it. > > Perhaps something like session_revert_close() - "revert" being a closely > analagous action in version control systems. session_revert_close() sounds reasonable if session_write_close() is main function. Rather than session_start(), session_open() would be better name, since there is session_write_close(). IIRC, session_write_close() was considered odd name and session_commit() is made as alias of it later. Expect-able/consistent function names may be better as main function and document them for new release. We should be careful not to have too many aliases, though. Main functions session_start() (or session_open()?) session_write_close() session_revert_close() Aliases session_open() (or session_start()?) session_commit() session_abort() Introducing session_revert_close() only seems good to me, but I don't mind to have session_open()/session_abort() at all. Any comments? Choosing good names is difficult ;-) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c344e2a8e52e04ef190539--