From: "northeastprince (Matt Almeida) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "northeastprince (Matt Almeida)" <noreply@ruby-lang.org>
Subject: [ruby-core:120756] [Ruby master Feature#21082] Alias it to its
Date: Wed, 22 Jan 2025 00:13:00 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-111618.20250122001259.56392@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-21082.20250121144628.56392@ruby-lang.org>
Issue #21082 has been updated by northeastprince (Matt Almeida).
Hey Martin! Thanks for your input.
It seems like there's a very small amount of core method names that would have such a level of linguistic dissonance based on the receiver. However, even something like `ledger.include? transaction` seems more adaptive than `it.title`, though that might just be me.
Happy to let `it` sit for a while before any changes are considered 😆.
----------------------------------------
Feature #21082: Alias it to its
https://bugs.ruby-lang.org/issues/21082#change-111618
* Author: northeastprince (Matt Almeida)
* Status: Open
----------------------------------------
One of Ruby's core tenants is beautiful code - and a key part of that is sweating the names. Adding `it` as a pointer to the first block parameter was a huge step forward in that regard, but we're not done yet. If `[1, 2, 3].each { puts it }` works, `posts.each { puts its.title }` should work too.
--
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/lists/ruby-core.ml.ruby-lang.org/
next prev parent reply other threads:[~2025-01-22 0:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-21 14:46 [ruby-core:120747] " northeastprince (Matt Almeida) via ruby-core
2025-01-21 23:26 ` [ruby-core:120755] " duerst via ruby-core
2025-01-22 0:13 ` northeastprince (Matt Almeida) via ruby-core [this message]
2025-01-22 11:47 ` [ruby-core:120760] " Earlopain (Earlopain _) via ruby-core
2025-02-13 6:44 ` [ruby-core:120967] " matz (Yukihiro Matsumoto) via ruby-core
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-111618.20250122001259.56392@ruby-lang.org \
--to=ruby-core@ml.ruby-lang.org \
--cc=noreply@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).