Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103864 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 6447 invoked from network); 28 Jan 2019 16:48:16 -0000 Received: from unknown (HELO mail-ed1-f42.google.com) (209.85.208.42) by pb1.pair.com with SMTP; 28 Jan 2019 16:48:16 -0000 Received: by mail-ed1-f42.google.com with SMTP id b3so13048133ede.1 for ; Mon, 28 Jan 2019 05:27:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=MiF/OCKsf32tOZDr2pota9O5F1o/kVWVMmbEhifkm/o=; b=Qx7RnwkSDz/vpcixOw47VJZgPMyZ9SdOPTWq0s6sTZycTgRl8CObNPNbUXWDR1Ljp8 C2/7qmOtysECbyW5OmzuEbuT7tdvpSKCp62UCCPjrQsfzUnweLdYfh9psdBEvT5c1sTk Y7lAvuXK18rC0P/PgcvFHuHYqaSXJa8MJN4rQcdeMT+qhPPB68l4FsKL2EUQDayS/UxB q20jrYW/vqM33JdvfEJlP3INUNMHhFUIkOZcvS6CmoIofvYsaQrIHhg2KCidvpuB17Qt p2KCCqEuI52ZavS1fA/V1XHHn8cax4OypnYHChM5IcB+xSqybNTcs5SoJMsoz4/vAm3a boUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=MiF/OCKsf32tOZDr2pota9O5F1o/kVWVMmbEhifkm/o=; b=lmfVERP6hTRIIe/WWVVrTGvB/TJzYgtp6Qp4Y9u0dUUIRBuktUPq+CEsfAScgL+qs3 +6BfW5LwpOoFhYxaWp40aibqeb4KV1BO6Hsom5fm6yFhQwEH7zB6X+yTDyyVZt7sOE0C gOz18YJMQG6H0FpYvLgBsF5ZQh+zJK1cAwBLoq47eUrICm1fD13istuaB7z/eCB3g7l6 EXZxfNI/eg00Z8cHMXdk9jKcYf992I+p87snxxfTjS3rX2eTHpHcC+cPDxZtSJbyhjmB pSFwsj+DWsOydvtT83cdny2zH4YcsqqJE6E99qZ0SOg48Z9qawFCFtN1nOw/zDr56on2 RM+g== X-Gm-Message-State: AJcUukd+8hc5xjg+mK5QW0LuuE5hnwW4WbxmJjlXZYzLE5+DBaxgW+q+ Mk/W5nrRWwkUAYP1SBdzubQ= X-Google-Smtp-Source: ALg8bN4GohyNuDAyt3j7xWNXF8c0823JHkaiM3Uy4zCtODVX5X9Pg2Rgxs2YmxMIrUywTQraJ3cdKg== X-Received: by 2002:a17:906:c9c4:: with SMTP id hk4-v6mr19122906ejb.249.1548682043693; Mon, 28 Jan 2019 05:27:23 -0800 (PST) Received: from [192.168.0.63] (84-75-30-51.dclient.hispeed.ch. [84.75.30.51]) by smtp.gmail.com with ESMTPSA id p1-v6sm7391630ejo.49.2019.01.28.05.27.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 05:27:22 -0800 (PST) Message-ID: <14CE9545-6E03-4BE1-B21B-74442AB98BA3@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_09D10DFF-4E24-43E9-8933-6B1ACEBBBB6A" Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Date: Mon, 28 Jan 2019 14:27:21 +0100 In-Reply-To: Cc: Nicolas Grekas , Sebastian Bergmann , PHP Internals List To: Marco Pivetta References: X-Mailer: Apple Mail (2.3445.102.3) Subject: Re: [PHP-DEV] [RFC] New custom object serialization mechanism From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_09D10DFF-4E24-43E9-8933-6B1ACEBBBB6A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 28 janv. 2019 =C3=A0 08:58, Marco Pivetta a = =C3=A9crit : >=20 >>=20 >> Here, both aspects are not desired: we don't want ppl to type-hint = for >> e.g. Serializable - and too bad it exists because I've already seen = ppl >> think: "hey, I'll type-hint or extend it to express I want a = serializable >> thing". >=20 >=20 > That's actually a very correct thing to do: by declaring that = something is > `Serializable`, you are expressing your intent to anybody inspecting = the > structure of the object. >=20 This interface (as well as `JsonSerializable`) is incorrectly named. If = I believe the manual, it is an =E2=80=9Dinterface for customized = serializing=E2=80=9D; therefore it should have been called = `CustomizedSerialization` or something like that. If we use a new interface, at the very least, let its name match its = function (or its function match its name). =E2=80=94Claude= --Apple-Mail=_09D10DFF-4E24-43E9-8933-6B1ACEBBBB6A--