Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103737 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 70066 invoked from network); 14 Jan 2019 18:53:13 -0000 Received: from unknown (HELO mail-yw1-f42.google.com) (209.85.161.42) by pb1.pair.com with SMTP; 14 Jan 2019 18:53:13 -0000 Received: by mail-yw1-f42.google.com with SMTP id d190so8729720ywd.12 for ; Mon, 14 Jan 2019 07:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1X/r/RtPrOhIhKSxm6ycroP63BNSkN+9/5eezWPZCI8=; b=LgXRghT1/dGr5dGFZRYPQS50Qi0ALqdozDNU5nkBposli09GJeT+LMCjRhhdUSoohd +3pV9TVr1bfPK+KGj8WGZmcnDf80GxbtsxRHIoJcJv2shTOA0RGCT8OseFEulGuhRaua 6vig5i97wcoY2dtt9OAdxCCDnohxXrrM0NNMOVqxnHx5rtnxmAstvyyYJXadolSLBPDR LAfGXmSHFCPOFOXxITMak3U6nLRvsYd0+JyQkxQBOz6DOYt0slrOVhXoWOO4ewBz+jUH sMgXKKDovP2CQ0UA7zwZuAe4uGC2ypzCeFQjLZa95VSs+kHm4XyTUpJ2mF5qXDFI118W r3TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1X/r/RtPrOhIhKSxm6ycroP63BNSkN+9/5eezWPZCI8=; b=hI9WD3qalgD7aXSK1q5twFFaCNWqE2kePyTr6RTCgAd1qDR/5ZLFTYOSe0SyWtmIB5 2A293iuHaL67ep4bmWnji+ySnYQ6yfmRKO1tw5llZsr3YPfl+bmgxAsu3BQ+8ZfHiYD7 LGqdoMMHrAJOmesgRv2CKYnnWVpOGyW0XwkRX9IDs/cANHXsHbH+lJlombWhaKubfHRv Tt3BE8Asna7BBuVDKRHylkf8V+xNSm7o3QuJiaiNd7oEESZPIatiL5nDasa320K8C+Qp Bm53ACTY2c9+QTTolGYuFaqe3m0GZDdJI32T+dG5GqaJACmkw1w7VxOxmcAYLYfVGqf/ Zt6w== X-Gm-Message-State: AJcUukezP0T6PR+mWIadTyzhxiPsoqYQpTDmOyRiKqzqdjaFne9muvLM 9+zVXXdaKLMX9TY3sO9q/Tg29raUofV+GHSL2uQ= X-Google-Smtp-Source: ALg8bN6ml600UWcoJz5TyUsgJZ7ObwRmyeYPx3Nrf/Ljh8CIo4myEAPSEH6trBHzI3FUNwk2tpUrs/kuOCvN86FuqF4= X-Received: by 2002:a81:e401:: with SMTP id r1mr25004557ywl.381.1547479732921; Mon, 14 Jan 2019 07:28:52 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 14 Jan 2019 16:28:40 +0100 Message-ID: To: Marco Pivetta Cc: Nikita Popov , Rowan Collins , Craig Duncan , Internals Content-Type: multipart/alternative; boundary="000000000000c72d2a057f6cb30c" Subject: Re: [PHP-DEV] Making stdClass iterable From: benjamin.morel@gmail.com (Benjamin Morel) --000000000000c72d2a057f6cb30c Content-Type: text/plain; charset="UTF-8" > `stdClass` can't die due to a lot of backwards compatibility in existing code (wordpress loves it) I, personally, would LOVE to see PHP break things on each release of a major version! I fail to see how upgrading could be painful, with a good changelog and the right E_DEPRECATED notices for a minor release or two, enough time to make it run in dev and even production, and working on deprecation notices as they appear in the log; this would make the language move much faster towards a better language. But I digress. On Mon, 14 Jan 2019 at 16:18, Marco Pivetta wrote: > On Mon, Jan 14, 2019 at 4:09 PM Benjamin Morel > wrote: > >> > We should never have added stdClass. >> >> Why not deprecate it then, instead of extending it and giving it more >> legitimacy? >> This would remove some of the "2 ways of doing the same thing", such as >> json_decode(). >> >> Ben >> > > This. > > `stdClass` can't die due to a lot of backwards compatibility in existing > code (wordpress loves it), but in any code I've written over the past 5 > years, the first thing I'd do with it is get rid of it as fast as possible. > > Making it more powerful will just make the problem bigger. > > Marco Pivetta > > http://twitter.com/Ocramius > > http://ocramius.github.com/ > > --000000000000c72d2a057f6cb30c--