From: "Eregon (Benoit Daloze) via ruby-core" Date: 2025-07-15T19:06:16+00:00 Subject: [ruby-core:122781] [Ruby Feature#17473] Make Pathname to embedded class of Ruby Issue #17473 has been updated by Eregon (Benoit Daloze). Discussion at https://github.com/ruby/dev-meeting-log/blob/master/2025/DevMeeting-2025-07-10.md#feature-17473-make-pathname-to-embedded-class-of-ruby-eregon I am disappointed, https://github.com/ruby/pathname/pull/53 makes the code clearly more maintainable and a lot easier to read, there is no value to have it in C. I don't see much value to have Pathname as a core class, `require "pathname"` is no big deal and since it depends on other gems & stdlib it's awkward. Having a partially-defined Pathname in core (missing some methods) seems the worst outcome. As pathname is already a gem, it also means we'll have two unsynchronized copies of the code, and with enough time maybe subtle behavior differences, this seems something nobody wants. @matz this decision is adding a lot of work to CRuby, and other Ruby implementations. Pathname or most of it should be defined in Ruby, having multiple copies of it in C, Java, Ruby, etc means useless duplication and things will get out of sync needlessly. > @nobu: if Pathname is embeded to the core, I prefer the C implementation to Ruby impl. Why? I see only disadvantages to that. > @ioquatix for the purpose of JIT isn't it better to write more Ruby in Ruby? > @shyouhei nobody wants to JIT a path manipulation. https://github.com/ruby/pathname/pull/53#issuecomment-2989134661 shows the Ruby code is faster than the C extension for Pathname. Even from a performance point of view it's bad to implement Pathname methods in C (for most methods). ---------------------------------------- Feature #17473: Make Pathname to embedded class of Ruby https://bugs.ruby-lang.org/issues/17473#change-114060 * Author: hsbt (Hiroshi SHIBATA) * Status: Closed * Assignee: akr (Akira Tanaka) ---------------------------------------- pathname is one of most useful utility class of Ruby. I'm happy to use Pathname without require it. Any thought? -- 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/