Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115055 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 87875 invoked from network); 23 Jun 2021 08:18:17 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jun 2021 08:18:17 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E61211804F3 for ; Wed, 23 Jun 2021 01:36:45 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 ; Wed, 23 Jun 2021 01:36:45 -0700 (PDT) Received: by mail-qk1-f169.google.com with SMTP id c23so3125249qkc.10 for ; Wed, 23 Jun 2021 01:36:45 -0700 (PDT) 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; bh=NqAvxi8iPx6lM/5s1Pv41FUkjxF7TQFfQSvcIoU7IuU=; b=uA098BhgWOMp7NVeisdr1EWIQJW6CnDTgmIYAVRggSfbo37o5f1pHuOZp2EIEYLGLI J8fixNDGcrLBzTSv84znpYvzbWYE6DpYEyw7Edh6tfkKKcUMW7xqrNIsL1tFJHxz+sLN KSZfMnwbx05ZrEwlf2WLc/8Jmoqir0hcE36GGvn4FEWcF4FIDCXRrezCAT/EwRNlq4bw bUTdcezQK5vEj8wdR0p3is7yRCbi96dZJACWy7i/D9C3BM2/0NIt8wgP7w4TxAULMU9M DYdgxWhEu4IKC/UG2bihdG4pWiYBV3JftM4xd2gDDn50D4/cRxaXpdJAnu9U+wzphrUB DT3A== 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; bh=NqAvxi8iPx6lM/5s1Pv41FUkjxF7TQFfQSvcIoU7IuU=; b=TNjjaZDUz0RRJYeRKHXcksj4e0FQ4EiwfjKIchBHI1wDdPYPjwLmITNjIDsNWMFVMw HPPsFOiZuudm87tpGGhQ4WFIQTXNhDsI7IiMBrWzofonHpqu1m3NeeS+ydjAp1zL02K/ ielCoJclqBVswxeOQXUUdDMRtYBcBAwdyQ6FRy7DWx2KvJSZzqXSR3ETzYSTTckRzfYO kTAaJ6rgWsMkfO1kiid6uVt5gZkDv7SphIRNoqQw65t6JyWLrhNHYlysJ/Kgx+ZWl8Rg vbXa3I3sn3Hsl6j12IJFybKGfvN3/zXBG9nRSg9R/TEIe69MkbxAOhpAroGWlDiHep7n G0dA== X-Gm-Message-State: AOAM531qDordUcFzMKNkPHk3I7+lZWXUrvQC7vEEpO3pl9WTBE9pxAUi 9r2QqDJvY21ZPbyXgG/SHvvMmp2/1mmneYGfTNz9eDhcX3Y= X-Google-Smtp-Source: ABdhPJwTRGdSW+U+wUD7M0cCLHarfVtchBFydDFL9v4siE8d9vZ/w89sbDFkVKPepla+h5NDrFblhg51N/rLF6QLOfs= X-Received: by 2002:a25:8b03:: with SMTP id i3mr6107113ybl.367.1624437403414; Wed, 23 Jun 2021 01:36:43 -0700 (PDT) MIME-Version: 1.0 References: <1014AE76-B3D5-48F7-A0F0-B8E3327123A2@gmail.com> In-Reply-To: <1014AE76-B3D5-48F7-A0F0-B8E3327123A2@gmail.com> Date: Wed, 23 Jun 2021 10:36:31 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Proposal: clamp From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Kim > I present to you a proposal for a new basic math function: clamp. > ... > What are your opinions on this function? I for one think this is a good candidate for PHPs standard library. It's simple, unopinionated and standardized in other languages. Even though it's simple to implement in userland (as many other internal functions would be) there's no good reason to require users to implement it themselves or require a package for simple functions. +1 from me. Ilija