Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64259 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19536 invoked from network); 11 Dec 2012 17:11:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Dec 2012 17:11:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=drgomesp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=drgomesp@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.170 as permitted sender) X-PHP-List-Original-Sender: drgomesp@gmail.com X-Host-Fingerprint: 209.85.215.170 mail-ea0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:48470] helo=mail-ea0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 62/0B-54245-23967C05 for ; Tue, 11 Dec 2012 12:11:15 -0500 Received: by mail-ea0-f170.google.com with SMTP id d11so1688021eaa.29 for ; Tue, 11 Dec 2012 09:11:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=VguYwe68+48gn2DTRl3fE5JyWQ+z+1xgHGnOUxQ6/Ro=; b=W8wVYFoIdtmILlrg18/g75QzAs2OSy2u8NRWY9rbMccDRMt28f7xJGpeIMPAN2HsZw p6pmykCZzQiNA0BgfkqpubPhhVAA9lDB8Sio8aTHZBRTru1qqoevF+zxrMX8W9zXhWth 1+RSYrajkoKA24F7l1pEDADg8yn38k2n5fuGyR3GXpiZAInxJo25ZWiGku1vAIy3Aqa4 F6faB9tf9ci3OEQKzxWHut5dzXbi7SGx7C5pJ1ppuKxHBv5CQHPdHeW/TucEmEuUZhwm acWUikPqdsc2Z7AQYbaFxV/ugAbowU7bHtVBcOlq09cupj09eirLHuNsH4MB4Ce86X1E Hffw== Received: by 10.14.221.5 with SMTP id q5mr61981917eep.33.1355245870966; Tue, 11 Dec 2012 09:11:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.211.73 with HTTP; Tue, 11 Dec 2012 09:10:50 -0800 (PST) In-Reply-To: <50C767FD.8070901@sugarcrm.com> References: <50C69191.5020201@sugarcrm.com> <50C767FD.8070901@sugarcrm.com> Date: Tue, 11 Dec 2012 15:10:50 -0200 Message-ID: To: Stas Malyshev Cc: Marco Pivetta , Nikita Nefedov , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b66f3c5b8e78804d096c493 Subject: Re: [PHP-DEV] DateTime improvement From: drgomesp@gmail.com (Daniel Ribeiro Gomes) --047d7b66f3c5b8e78804d096c493 Content-Type: text/plain; charset=ISO-8859-1 People tend to desire API changes that go on the same directions they are going. That's nature... Daniel Ribeiro Gomes Pereira Twitter | Facebook | LinkedIn iPhone: +55 (48) 9111-0931 2012/12/11 Stas Malyshev > Hi! > > > As Nikita says, from an ORM perspective, an object is always immutable > > (at least with current implementations I know of), and that's because > > they can simply use the object hashes to identify two different objects. > > Why for ORM Date is even an object? In most databases, date is a basic > value type, and should be accepted by value, not as a complex object. > So, it should also be identified as the value - for number 1, you do not > need additional identity or hash except it being number 1, same should > be for dates. > > > I don't believe (at all) in "if you don't need it mutable, don't use > > modify() oroverride modify()". If the API is there, people will use it. > > We tried to implement an immutable DateTime in userland, but it doesn't > > work out well... > > Why it doesn't work well and why PHP needs to be changed because of it? > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --047d7b66f3c5b8e78804d096c493--