So, there''s been some commenting on the Routing Concerns that has been added to rails. https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b This seems to be adding no more functionality or ease of use than simply using methods, Ruby''s standard form of reuse. Here''s are links to comments about using methods: https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1743800 https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746912 https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746901 I don''t see any added value that this adds. Would love to invite other comments and discussion on what this feature adds over just using Ruby. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/10sbFhly_lAJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
I am not really following up what is happening with the routes concern thing, but I just want to point out that using "def method" like the proposed solution introduces a chance of method conflict: draw do def parent_resource resource :parent end resources :posts do parent_resource end end Bam, now you are conflicting with https://github.com/rails/rails/blob/0dd24728a088fcb4ae616bb5d62734aca5276b1b/actionpack/lib/action_dispatch/routing/mapper.rb#L1414 and it can lead to a considerable amount of hair pulling. I don''t think there is a way for us to detect such conflicts (or is there a way to define a method_added hook in the object singleton class?). Besides, the fact that the current router implementation is a bunch of modules with many private methods (don''t get me started) just makes the chances of conflict higher. Of the suggestions I have seen so far, I liked the lambda one the most. But then, I am a sucker for functional programming. On Tuesday, August 21, 2012 11:09:05 PM UTC-3, Corey Haines wrote:> > So, there''s been some commenting on the Routing Concerns that has been > added to rails. > > https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b > > This seems to be adding no more functionality or ease of use than simply > using methods, Ruby''s standard form of reuse. > > Here''s are links to comments about using methods: > > https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1743800 > > https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746912 > > https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746901 > > I don''t see any added value that this adds. Would love to invite other > comments and discussion on what this feature adds over just using Ruby. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/pfGSL69yYKsJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
On Wednesday, August 22, 2012 7:04:17 AM UTC-5, José Valim wrote:> > ... >> Bam, now you are conflicting with > https://github.com/rails/rails/blob/0dd24728a088fcb4ae616bb5d62734aca5276b1b/actionpack/lib/action_dispatch/routing/mapper.rb#L1414and it can lead to a considerable amount of hair pulling. I don''t think > there is a way for us to detect such conflicts (or is there a way to define > a method_added hook in the object singleton class?). Besides, the fact that > the current router implementation is a bunch of modules with many private > methods (don''t get me started) just makes the chances of conflict higher. > >That''s a reasonable concern.> Of the suggestions I have seen so far, I liked the lambda one the most. > But then, I am a sucker for functional programming. >Yeah, the lambda one is nice. My main concern is adding another layer of abstraction/indirection that invites a bloat of routes. -corey> On Tuesday, August 21, 2012 11:09:05 PM UTC-3, Corey Haines wrote: >> >> So, there''s been some commenting on the Routing Concerns that has been >> added to rails. >> >> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b >> >> This seems to be adding no more functionality or ease of use than simply >> using methods, Ruby''s standard form of reuse. >> >> Here''s are links to comments about using methods: >> >> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1743800 >> >> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746912 >> >> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746901 >> >> I don''t see any added value that this adds. Would love to invite other >> comments and discussion on what this feature adds over just using Ruby. >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/quwSshopB7YJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
I''ve explained why concerns are wonderful and not going anywhere on the commit itself: https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1749011 On Wednesday, August 22, 2012 7:34:34 AM UTC-5, Corey Haines wrote:> > On Wednesday, August 22, 2012 7:04:17 AM UTC-5, José Valim wrote: >> >> ... >> > > >> Bam, now you are conflicting with >> https://github.com/rails/rails/blob/0dd24728a088fcb4ae616bb5d62734aca5276b1b/actionpack/lib/action_dispatch/routing/mapper.rb#L1414and it can lead to a considerable amount of hair pulling. I don''t think >> there is a way for us to detect such conflicts (or is there a way to define >> a method_added hook in the object singleton class?). Besides, the fact that >> the current router implementation is a bunch of modules with many private >> methods (don''t get me started) just makes the chances of conflict higher. >> >> > That''s a reasonable concern. > > > >> Of the suggestions I have seen so far, I liked the lambda one the most. >> But then, I am a sucker for functional programming. >> > > > Yeah, the lambda one is nice. My main concern is adding another layer of > abstraction/indirection that invites a bloat of routes. > > > -corey > > > > > > > >> On Tuesday, August 21, 2012 11:09:05 PM UTC-3, Corey Haines wrote: >>> >>> So, there''s been some commenting on the Routing Concerns that has been >>> added to rails. >>> >>> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b >>> >>> This seems to be adding no more functionality or ease of use than simply >>> using methods, Ruby''s standard form of reuse. >>> >>> Here''s are links to comments about using methods: >>> >>> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1743800 >>> >>> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746912 >>> >>> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746901 >>> >>> I don''t see any added value that this adds. Would love to invite other >>> comments and discussion on what this feature adds over just using Ruby. >>> >>-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/guF9Z-da6vIJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
David, On Wed, Aug 22, 2012 at 8:12 AM, DHH <david@loudthinking.com> wrote:> I''ve explained why concerns are wonderful and not going anywhere on the > commit itself: > https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1749011Actually you explained that they are not going anywhere. I don''t see an explanation in there about why they are wonderful. But, since conversation is shut down, I guess we can all sit back and continue to help teams recover from using your "wonderful" features. -Corey> > On Wednesday, August 22, 2012 7:34:34 AM UTC-5, Corey Haines wrote: >> >> On Wednesday, August 22, 2012 7:04:17 AM UTC-5, José Valim wrote: >>> >>> ... >> >> >>> >>> Bam, now you are conflicting with >>> https://github.com/rails/rails/blob/0dd24728a088fcb4ae616bb5d62734aca5276b1b/actionpack/lib/action_dispatch/routing/mapper.rb#L1414 >>> and it can lead to a considerable amount of hair pulling. I don''t think >>> there is a way for us to detect such conflicts (or is there a way to define >>> a method_added hook in the object singleton class?). Besides, the fact that >>> the current router implementation is a bunch of modules with many private >>> methods (don''t get me started) just makes the chances of conflict higher. >>> >> >> That''s a reasonable concern. >> >> >>> >>> Of the suggestions I have seen so far, I liked the lambda one the most. >>> But then, I am a sucker for functional programming. >> >> >> >> Yeah, the lambda one is nice. My main concern is adding another layer of >> abstraction/indirection that invites a bloat of routes. >> >> >> -corey >> >> >> >> >> >> >>> >>> On Tuesday, August 21, 2012 11:09:05 PM UTC-3, Corey Haines wrote: >>>> >>>> So, there''s been some commenting on the Routing Concerns that has been >>>> added to rails. >>>> >>>> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b >>>> >>>> This seems to be adding no more functionality or ease of use than simply >>>> using methods, Ruby''s standard form of reuse. >>>> >>>> Here''s are links to comments about using methods: >>>> >>>> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1743800 >>>> >>>> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746912 >>>> >>>> https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746901 >>>> >>>> I don''t see any added value that this adds. Would love to invite other >>>> comments and discussion on what this feature adds over just using Ruby. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-core/-/guF9Z-da6vIJ. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.