Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123473 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 6D50D1A009C for ; Fri, 31 May 2024 15:11:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717168364; bh=5UHYrOX3d4wfWG1TkkgrejBRYkkY7I4VHF9BAbVBTUA=; h=References:In-Reply-To:From:Date:Subject:To:From; b=kM5lm+U7hvU5DerdrRm/xm8pNA5GdbXUv63qBZXmMeist6plU4gRqMVspkrlpjpDA zIKpMAMCtzG5C/n/nc+3ZajEhI4GyKVbN9MTY7UmOQPRr0PapfjgkIXA8usAKkwTrf CdFMzW4y6/egO82daNSLI8yEeFJSLC0xQfyTsc5nus2sT+3CHS2PZ2WJ9M+Yfj1RQv WlSJjoJivIw2ye+v9ty0hfmt+vv09NpS0zuC4Bc5JMwiV2fmo5RlTqYoNZlnNs/MYa ntEmF7/pGDrY00IMKAnuLxr8zllcN8yFnr4SirBlELycYqH/nZlncnyJqOfIK+f9Ox VFXCewlhCAvrQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2E2D918085A for ; Fri, 31 May 2024 15:12:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-vk1-f176.google.com (mail-vk1-f176.google.com [209.85.221.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 31 May 2024 15:12:43 +0000 (UTC) Received: by mail-vk1-f176.google.com with SMTP id 71dfb90a1353d-4eaedca1b40so733569e0c.1 for ; Fri, 31 May 2024 08:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717168301; x=1717773101; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=5UHYrOX3d4wfWG1TkkgrejBRYkkY7I4VHF9BAbVBTUA=; b=TDMwo0u6cHtBEwh2m93a4XcE13YNY3dgP1rXJNysHzs4B3Jfbh4m4Jzc7opjFOpmnF 4u/5mwBAF5OyxetD9vs8ByzCeH3JIkmZdexDNBULE27ylLLN9gezrYiofrRmCxRh/eaK ME2i2s7xUWQUZe8S0RDDbrqnjZC4LxFFCws3K/qqBN9/kbvyH84Jg2QgnblvxqGK0J9Z vYPn3dhfQl+jb9CMiCrHrgFN65YGshiSeQMsCWCzxFFygudUasw/pBxaP5g4RY2W71au 1JYMH8/825cr2rJKno1ib8Q88Mki+iRV6R1tC7LSPF7w5vK5hjcTShsT5mHhvNYkxCYo rxfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717168301; x=1717773101; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5UHYrOX3d4wfWG1TkkgrejBRYkkY7I4VHF9BAbVBTUA=; b=CubtKYZ1KSMnkFiHCaLXzHvc8IHPVJoBjfbYsGneGm+aybnUjHRLqSHOqHOJHQEr5H fBwlqPcogDSKJ3HlND6pBYIo8gxjX7KVGunbpZkkNWOv1kjFyQMCrfJ/htrBNpwUJGAv CJPYL5edy/mdvjhVknN8wIQBG6FhLN1qtgPhAHhpkDUS9Tse1Mr9NMY11tnBldpqJ9m7 uEiLOafnucbuVpSeNmJeqj72T9RHPwuxgj8n4kxOP4MYF9+GqfizVVLzXq3pHf6tvmog bl4ujVlCCwPTpXuScF93/R9OeE2EvXucEP0zhjGK1Iu2cJgXzcCpCIb+Me5c+YCVRDX8 FsPA== X-Gm-Message-State: AOJu0YzdgMIQPCxliKZWrBeE8AFWNuD+2q5O+UQOy1E+GlYI+deldEvh G/xJUfQSVK0fYTBc+KfuxUkI1WqZ5JxTW74/4KfuZKD8qSSBNoQZa1+XHp6g9nos845klZLpmAr sTYomkAhmXc0weysxxbs/PCv6oXCAeJDbD2w= X-Google-Smtp-Source: AGHT+IG0+sFbNeLMKhWgaLe87B2lMNoDq0o7jX66LwIvBATXM52Lpq7TxlJogIFORui1kOIqU0pRrIbRNnarxkWrb7A= X-Received: by 2002:a1f:e483:0:b0:4d4:20cb:8c0 with SMTP id 71dfb90a1353d-4eb02dac60bmr2085652e0c.8.1717168299217; Fri, 31 May 2024 08:11:39 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <81CBE5A8-9FAF-40DA-8EAB-9F19C2278E75@sakiot.com> In-Reply-To: <81CBE5A8-9FAF-40DA-8EAB-9F19C2278E75@sakiot.com> Date: Fri, 31 May 2024 12:11:02 -0300 Message-ID: Subject: Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum To: php internals Content-Type: multipart/alternative; boundary="0000000000007e9d480619c16667" From: ericklima.comp@gmail.com (Erick de Azevedo Lima) --0000000000007e9d480619c16667 Content-Type: text/plain; charset="UTF-8" > To resolve these issues, change the naming to something appropriate and use Enums instead of int constants. Hi! I like the idea. But I don't know From the RFC text: > To summarize, existing features will be changed to a union type of int| \RoundingMode, and unreleased features will only accept \RoundingMode as the rounding mode argument. I have mixed feelings about the unreleased features using a different typing for the same parameters that already exist in the existing features. On one side, the user would be forced to use the new approach and get used to it when they start to use the unreleased features, but on the other side, the code would be strange with 2 different approaches for similar features of the same "feature set". I think that I would use union types for everything and plan the deprecation and further removal of the Int version for the next releases for everything. Anyway, I'm in favor of starting the movement of changing these Ints to Enums. Thanks for working to make PHP better! Best regards, Erick --0000000000007e9d480619c16667 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> To resolve these issues, change the = naming to something appropriate and use Enums instead of int constants.

Hi!
I like the idea. But I don&= #39;t know

From the RFC text:
> T= o summarize, existing features will be changed to a union type of int|\RoundingM= ode, and unreleased features will only accept \RoundingMode as the rounding mode argument.

I have mixed feelings about the unreleased features using = a different typing for the same parameters that already exist in the existi= ng features. On one side, the user would be forced to use the new approach = and get used to it when they start to use the unreleased features, but on t= he other side, the code would be strange with 2 different approaches for si= milar features of the same "feature set".

I think that I w= ould use union types for everything and plan the deprecation and further re= moval of the Int version for the next releases for everything.
Anyway, I'm in favor of starting the movement of changing = these Ints to Enums.

Thanks for working to make PH= P better!

Best regards,
Erick
--0000000000007e9d480619c16667--