From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D41E61F44D for ; Sat, 13 Apr 2024 19:29:56 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=UOfXpAlU; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=me4RzsNr; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 1FB61842A5; Sat, 13 Apr 2024 19:29:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1713036587; bh=r4d1WVsHNbuKMqT31SVAmnTguIbrkG/qOx7SOLHcn7A=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=UOfXpAlUHpOqc6En0CkW8/JayBUp6xAf5SRtHvfK+0kyQMdABXe3A+qmt/svX9E8W 4vjOn9jwuQUKb3yMk9fGHSJ8Tl0VXT8Fko1HKqCfdaQH4Fm85Fq3t+kdgEEvV/vKbT /8d3uWm+D0xD4XL1pCHdct1nXOCKB/4G2qYDGoOw= Received: from s.wrqvwxzv.outbound-mail.sendgrid.net (s.wrqvwxzv.outbound-mail.sendgrid.net [149.72.154.232]) by nue.mailmanlists.eu (Postfix) with ESMTPS id EF61284255 for ; Sat, 13 Apr 2024 19:29:43 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=me4RzsNr; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=IrPX4sOrbHmQYRNHGDVELl2riKeiaJXsBLPznPorKNI=; b=me4RzsNrh8AyfhdiBrx3xf65joLr3p1RpmsWVvu7lUlXIjabtnY+H3n6rwJcskRIg542 ucIJgvPqa6Qz/fSM2OYYvdWrjsSaNvUpZa0OSyMfgwX2PQGPpI3OvZw06h1pPfAos4ntjS au2bGVmrdxMU5jCKZ/AaTAS9sZZVaPEtmtxqRtTP2wM3a8kOfjE0irVFYu4K3zz40TbDgF FH9gR0tvm1gHt4rZm/OX/6HPqlKgeVXyLs10vu2k/vdHjGmuDYDvZuGXgH4C7/ajzFCp8G gTR5BBObOKXNFD5NPmlxxgvhw4HqLgpK62bcVNAe9+vP7CB8VeSOxk9w3sAAahLQ== Received: by recvd-bb7996b79-qghgv with SMTP id recvd-bb7996b79-qghgv-1-661ADD26-2 2024-04-13 19:29:42.214795079 +0000 UTC m=+77347.014662439 Received: from herokuapp.com (unknown) by geopod-ismtpd-10 (SG) with ESMTP id xvYVArP1RPuqbImkg7xzAA for ; Sat, 13 Apr 2024 19:29:42.143 +0000 (UTC) Date: Sat, 13 Apr 2024 19:29:42 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 18576 X-Redmine-Issue-Author: byroot X-Redmine-Issue-Priority: Normal X-Redmine-Sender: alexander-s X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 94103 X-SG-EID: =?us-ascii?Q?u001=2E8ib2YpgrbJfqxuI2Pm7JYSWq0o6+Ho6sl6KgzBXDdfwVYgEzqFUJKdiHN?= =?us-ascii?Q?VIXtiile5=2FD5jjtihd0Bqamij+oamqz4AWpINKd?= =?us-ascii?Q?=2Fhp5j3qRmUDApMIeyx4f1I2lB4aE2V6reEJMNO1?= =?us-ascii?Q?g7EgdcY65IjAY1EuBZi0042wU0b8YHslcOrA8gp?= =?us-ascii?Q?3N6pFlxY7ezkK0a3sVZ00W229WgQG3+Y6UEBBbP?= =?us-ascii?Q?R8GZUzW0RHnPMkdFDaL7L4+pTA7skde5rjfZrmP?= =?us-ascii?Q?trFigpqaejRnMImS8nkz+iX+=2Fg=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: TY2W5RCBOZFBOGEOXFMD55MMRFVZ5OKU X-Message-ID-Hash: TY2W5RCBOZFBOGEOXFMD55MMRFVZ5OKU X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:117508] [Ruby master Feature#18576] Rename `ASCII-8BIT` encoding to `BINARY` List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "alexander-s (Alexander S) via ruby-core" Cc: "alexander-s (Alexander S)" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Issue #18576 has been updated by alexander-s (Alexander S). matz (Yukihiro Matsumoto) wrote in #note-14: > I don't object to the proposal itself. But as @ko1 searched, there are so= many gems that compare `Encoding#name` and `ASCII-8BIT`. > So I don't accept the proposal for the sake of compatibility. >=20 > Matz. I've been developing with Ruby for some 10+ years now, and overall I really= like the language. However, I also feel that Ruby sometimes seems too focused on being backwar= ds compatible, to a point where it risk hurting the ecosystem. I think this= thread is a good example, because it seems like such a small and benign ch= ange, yet it's taken several years and lots of back and forth, and in the e= nd the proposed change wasn't even applied(!?). At the same time, several parts of the standard library feels outdated (Net= ::HTTP for example), and others misplaced (OLE-automation anyone?). On the = other hand, new "cool features" are sometimes introduced that I don't reall= y see any value in. For example 'endless ranges' and 'single line end-less = method definition'. In short, I share much of Bbatsov's (RuboCop author) se= ntiment from this article (https://metaredux.com/posts/2019/04/02/ruby-s-cr= eed.html). There is good progress too, I'll happily admit. A few examples that comes t= o mind are 'keyword params', 'unifying Integer/Fixnum', 'UTF-8 encoding by = default', the Prism parser and the focus on performance. All these seemed l= ike sensible improvements, in alignment with development in other modern la= nguages. Others probably have a much better ideas on what old stuff could be improve= d, but it could be for example: - Remove or deprecate globals - Update the Rubydoc system (many other languages have better documentation= systems) - Continue cleaning up the stdlib (some progress has been made in recent Ru= by releases, which is good) - Look at popular rules in RuboCop etc, for stuff that people are frequentl= y disabling with linting, and consider deprecating them. - Take it easy with new syntax, ruby already have 'many ways to solve the s= ame problem'. Something like end-less method definition seems like a pointl= ess addition. On our team, we just disabled it with linting on day one. To summarize, obviously backwards compatibility is important. But progress = is inevitable and a language that doesn't development at a reasonable pace = will eventually stagnate and die. I don't think ruby is there yet, but I'd = hate to see it go down that path. I also think think much of this can be ma= naged with deprecation messages and the like. ---------------------------------------- Feature #18576: Rename `ASCII-8BIT` encoding to `BINARY` https://bugs.ruby-lang.org/issues/18576#change-107895 * Author: byroot (Jean Boussier) * Status: Open * Target version: 3.4 ---------------------------------------- ### Context I'm now used to it, but something that confused me for years was errors suc= h as: ```ruby >> "f=E9e" + "\xFF".b (irb):3:in `+': incompatible character encodings: UTF-8 and ASCII-8BIT (Enc= oding::CompatibilityError) ``` When you aren't that familiar with Ruby, it's really not evident that `ASCI= I-8BIT` basically means "no encoding" or "binary". And even when you know it, if you don't read carefully it's very easily con= fused with `US-ASCII`. The `Encoding::BINARY` alias is much more telling IMHO. ### Proposal Since `Encoding::ASCII_8BIT` has been aliased as `Encoding::BINARY` for yea= rs, I think renaming it to `BINARY` and then making asking `ASCII_8BIT` the= alias would significantly improve usability without backward compatibility= concerns. The only concern I could see would be the consistency with a handful of C A= PI functions: - `rb_encoding *rb_ascii8bit_encoding(void)` - `int rb_ascii8bit_encindex(void)` - `VALUE rb_io_ascii8bit_binmode(VALUE io)` But that's for much more advanced users, so I don't think it's much of a co= ncern. --=20 https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-c= ore.ml.ruby-lang.org/