Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114196 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 67184 invoked from network); 27 Apr 2021 13:17:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Apr 2021 13:17:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C60021804BD for ; Tue, 27 Apr 2021 06:21:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 27 Apr 2021 06:21:50 -0700 (PDT) Received: by mail-vs1-f44.google.com with SMTP id m17so18374vsn.10 for ; Tue, 27 Apr 2021 06:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zirgbIrtDfzHkGcAyDjY3+sWRpy2jPftv/K+1bIDaAo=; b=l2j47gGuedM8Af6+dSJK5n6z2zZPCx8YD79r1Q/dT+D5/pEHD54aA0wR9X8lho47D6 8AAAQlXOsB8U9kqjMvo8xkk6O7Nb2yLuiCG/DXVNbX9g/uvLDiDNGcBWHtUyBrTv4So2 zCOpYGwmW/6FxdXFKsJN4udrRHKFtyN1GpI/gWzZrXHQAucddapmHacZM5TzAITBwtAs C2D/EGoqE0abxAfYXbu9TH6W7tgv6Y3+EtMADupdw42i6tHGv3MDQ70qKUTiUx+mHwBt YW7rt+20MHzYHjRnd0qvrPihfzG87ySGSWYTbOnVVosOSoWYjJq+HGogisZ9Evcm3Bav ImLw== 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=zirgbIrtDfzHkGcAyDjY3+sWRpy2jPftv/K+1bIDaAo=; b=NT09lKtQDQ86qWtZ4/vSKnHSJhHGC0l2043d3iaQVnY4bIBDIvn3DV3dOxsY0sqOyh T2wVnzeOKIj0QuK/yb1eanbIOzgmk9FfyWpTA4yi0RJkgJ3PEbvIqqsVGSXZz0eglnic xOC0vqbcTL2+IVGCaqLzeqFQWtwX4lTJNN07C4jP4nbgO2qZpZa1IrpxvmJKo9Yh08Yi /XYsO5lDRvzsN2ZUkjXVH8YThwSpL58mrDCklce49ethin/5nJAlQzIHaG6d0a+5g8tT w+H2krETlaZCIdU2WxsH5Um2tzVwlzdgMC5haKlR4dHEGnpwpbPK36UvCqp4eRseKhp5 dNUQ== X-Gm-Message-State: AOAM530UJAxYyNBd/kxlQTjXHIdTBMs3JE6eMAcg3u3CXvILuhtmG5VR wrgxtBUfWQsRH5wAIloZFTEWZ9FWjZQodC6qlJeB4g== X-Google-Smtp-Source: ABdhPJzRJfZxXupdr2lzXO/R6vSdTm6AMxJ5S5isfXjd/lvfQpKcZAJrqVdnwGt/j4OiI9oc55qy27qOtbzuJCgca7M= X-Received: by 2002:a67:f851:: with SMTP id b17mr18005291vsp.37.1619529708576; Tue, 27 Apr 2021 06:21:48 -0700 (PDT) MIME-Version: 1.0 References: <5b9f1500-615a-48f1-815f-1d48b327ef90@processus.org> In-Reply-To: Date: Tue, 27 Apr 2021 14:21:34 +0100 Message-ID: To: Benjamin Eberlei Cc: Pierre , Saif Eddin Gmati , PHP Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC][Draft] Sealed Classes From: Danack@basereality.com (Dan Ackroyd) On Sat, 24 Apr 2021 at 15:03, Benjamin Eberlei wrote: > > There is a much less invasive way to add new keywords/flags > to functions by using attributes. > > Imho this decouples new features from the language and reduces the "risk" > of adding them to the language. I think I disagree with this very strongly, and plan* to vote against any RFC that embeds another language in annotations.** It might be quicker, easier, and more seductive to implement language level features in them, but it is a massive trade-off in making code hard to reason about. > That should increase the likeliness of it > getting accepted in my opinion. This can also be pronounced as "makes it more likely to slip bad ideas in core without thinking them through fully". My experience of annotations being used as an embedded language is Java, and it's one of the reasons why I no longer use that language. Not only is code with many lines of annotations hard to read, it results in behaviour that is very hard to reason about. I literally spent 40 hours (spread over the course of 5 weeks), trying to figure out this bug https://stackoverflow.com/q/9072749/778719 . If my colleague hadn't been able to tell me the answer, the only way I could have debugged the problem myself is using a bytecode level debugger, to step through the internal details of what was happening. I'd prefer it if we didn't repeat (what I consider to be) the mistakes of Java. cheers Dan Ack * possibly with the exception of optimization annotations e.g. 'memoize'. ** "From a language design perspective, annotations form a mini-language embedded in Java" - https://blog.softwaremill.com/the-case-against-annotations-4b2fb170ed67 Though probably most of the other links from "java annotations are crap" are also appropriate.