ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:91010] [Ruby trunk Bug#15523] `Range#begin` and `Range#end`
       [not found] <redmine.issue-15523.20190111044448@ruby-lang.org>
@ 2019-01-11  4:44 ` sawadatsuyoshi
  2019-01-11  4:45 ` [ruby-core:91011] " sawadatsuyoshi
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: sawadatsuyoshi @ 2019-01-11  4:44 UTC (permalink / raw)
  To: ruby-core

Issue #15523 has been reported by sawa (Tsuyoshi Sawada).

----------------------------------------
Bug #15523: `Range#begin` and `Range#end`
https://bugs.ruby-lang.org/issues/15523

* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
My understanding is that `Range#begin` and `Range#end`'s features are just subsets of `Range#first` and `Range#last`, respectively. And since they are slightly confusing with the keywords `begin` and `end`, I propose to either:

* Let `Range#begin` and `Range#end` be aliases of `Range#first` and `Range#last`, respectively, or
* Let `Range#begin` and `Range#end` be obsolete after a migration path of waning against their use and recommending the use of `Range#first` and `Range#last` instead.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:91011] [Ruby trunk Bug#15523] `Range#begin` and `Range#end`
       [not found] <redmine.issue-15523.20190111044448@ruby-lang.org>
  2019-01-11  4:44 ` [ruby-core:91010] [Ruby trunk Bug#15523] `Range#begin` and `Range#end` sawadatsuyoshi
@ 2019-01-11  4:45 ` sawadatsuyoshi
  2019-01-11  4:51 ` [ruby-core:91012] [Ruby trunk Feature#15523] " kou
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: sawadatsuyoshi @ 2019-01-11  4:45 UTC (permalink / raw)
  To: ruby-core

Issue #15523 has been updated by sawa (Tsuyoshi Sawada).


Sorry, please change this to a feature request instead of a bug report.

----------------------------------------
Bug #15523: `Range#begin` and `Range#end`
https://bugs.ruby-lang.org/issues/15523#change-76232

* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
My understanding is that `Range#begin` and `Range#end`'s features are just subsets of `Range#first` and `Range#last`, respectively. And since they are slightly confusing with the keywords `begin` and `end`, I propose to either:

* Let `Range#begin` and `Range#end` be aliases of `Range#first` and `Range#last`, respectively, or
* Let `Range#begin` and `Range#end` be obsolete after a migration path of waning against their use and recommending the use of `Range#first` and `Range#last` instead.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:91012] [Ruby trunk Feature#15523] `Range#begin` and `Range#end`
       [not found] <redmine.issue-15523.20190111044448@ruby-lang.org>
  2019-01-11  4:44 ` [ruby-core:91010] [Ruby trunk Bug#15523] `Range#begin` and `Range#end` sawadatsuyoshi
  2019-01-11  4:45 ` [ruby-core:91011] " sawadatsuyoshi
@ 2019-01-11  4:51 ` kou
  2019-01-11 11:13 ` [ruby-core:91020] " shevegen
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: kou @ 2019-01-11  4:51 UTC (permalink / raw)
  To: ruby-core

Issue #15523 has been updated by kou (Kouhei Sutou).

Tracker changed from Bug to Feature
Backport deleted (2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN)

Done.

----------------------------------------
Feature #15523: `Range#begin` and `Range#end`
https://bugs.ruby-lang.org/issues/15523#change-76233

* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
My understanding is that `Range#begin` and `Range#end`'s features are just subsets of `Range#first` and `Range#last`, respectively. And since they are slightly confusing with the keywords `begin` and `end`, I propose to either:

* Let `Range#begin` and `Range#end` be aliases of `Range#first` and `Range#last`, respectively, or
* Let `Range#begin` and `Range#end` be obsolete after a migration path of waning against their use and recommending the use of `Range#first` and `Range#last` instead.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:91020] [Ruby trunk Feature#15523] `Range#begin` and `Range#end`
       [not found] <redmine.issue-15523.20190111044448@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-01-11  4:51 ` [ruby-core:91012] [Ruby trunk Feature#15523] " kou
@ 2019-01-11 11:13 ` shevegen
  2019-01-13 13:17 ` [ruby-core:91068] " mame
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: shevegen @ 2019-01-11 11:13 UTC (permalink / raw)
  To: ruby-core

Issue #15523 has been updated by shevegen (Robert A. Heiler).


I have no particular pro or con opinion towards this proposal per se; however within
the two suggestions made, I think having these as aliases would be better than
obsolete them. People could then decide to use either variant if they would like
to whereas with the second suggestion they may be first to forego the use of
begin/end as method names. Note that I understand the intent behind the 
deprecation thought, but I think it would still be better for ruby folks to decide
on their own what they would prefer. Not everyone is necessarily confused, although
I understand that it may be confusing for some.

(But again, I do not have any particular strong pro or con opinion as such. I actually
think that I may not have used #first or #last on Range so far in my own code
altogether; neither #begin or #end).

----------------------------------------
Feature #15523: `Range#begin` and `Range#end`
https://bugs.ruby-lang.org/issues/15523#change-76245

* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
My understanding is that `Range#begin` and `Range#end`'s features are just subsets of `Range#first` and `Range#last`, respectively. And since they are slightly confusing with the keywords `begin` and `end`, I propose to either:

* Let `Range#begin` and `Range#end` be aliases of `Range#first` and `Range#last`, respectively, or
* Let `Range#begin` and `Range#end` be obsolete after a migration path of waning against their use and recommending the use of `Range#first` and `Range#last` instead.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:91068] [Ruby trunk Feature#15523] `Range#begin` and `Range#end`
       [not found] <redmine.issue-15523.20190111044448@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2019-01-11 11:13 ` [ruby-core:91020] " shevegen
@ 2019-01-13 13:17 ` mame
  2019-01-14 12:52 ` [ruby-core:91080] " muraken
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: mame @ 2019-01-13 13:17 UTC (permalink / raw)
  To: ruby-core

Issue #15523 has been updated by mame (Yusuke Endoh).


Objection.

I understand that "your problem" is confusion between a keyword "begin" and "Range#keyword".  First, I have never been confused by the fact.  Then,

> * Let Range#begin and Range#end be aliases of Range#first and Range#last, respectively, or

This does not solve your problem at all.

> * Let Range#begin and Range#end be obsolete after a migration path of waning against their use and recommending the use of Range#first and Range#last instead.

Your problem looks too weak to me to deprecate an existing feature.


Off-topic: Could you please make the title informative?  "`Range#begin` and `Range#end`" doesn't tell me what is a problem or proposal.  I never say this to a newbie, but you have already opened hundreds of tickets.

----------------------------------------
Feature #15523: `Range#begin` and `Range#end`
https://bugs.ruby-lang.org/issues/15523#change-76290

* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
My understanding is that `Range#begin` and `Range#end`'s features are just subsets of `Range#first` and `Range#last`, respectively. And since they are slightly confusing with the keywords `begin` and `end`, I propose to either:

* Let `Range#begin` and `Range#end` be aliases of `Range#first` and `Range#last`, respectively, or
* Let `Range#begin` and `Range#end` be obsolete after a migration path of waning against their use and recommending the use of `Range#first` and `Range#last` instead.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:91080] [Ruby trunk Feature#15523] `Range#begin` and `Range#end`
       [not found] <redmine.issue-15523.20190111044448@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2019-01-13 13:17 ` [ruby-core:91068] " mame
@ 2019-01-14 12:52 ` muraken
  2019-01-14 14:15 ` [ruby-core:91081] " muraken
  2019-01-15  3:53 ` [ruby-core:91093] [Ruby trunk Feature#15523] Let `Range#begin` and `Range#end` be aliases of Range#first and Range#last sawadatsuyoshi
  7 siblings, 0 replies; 8+ messages in thread
From: muraken @ 2019-01-14 12:52 UTC (permalink / raw)
  To: ruby-core

Issue #15523 has been updated by mrkn (Kenta Murata).


@sawa Please tell us how can we get both the end-value of the exclude-end range and the last element of the sequence generated by the range if your proposal were accepted?

----------------------------------------
Feature #15523: `Range#begin` and `Range#end`
https://bugs.ruby-lang.org/issues/15523#change-76309

* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
My understanding is that `Range#begin` and `Range#end`'s features are just subsets of `Range#first` and `Range#last`, respectively. And since they are slightly confusing with the keywords `begin` and `end`, I propose to either:

* Let `Range#begin` and `Range#end` be aliases of `Range#first` and `Range#last`, respectively, or
* Let `Range#begin` and `Range#end` be obsolete after a migration path of waning against their use and recommending the use of `Range#first` and `Range#last` instead.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:91081] [Ruby trunk Feature#15523] `Range#begin` and `Range#end`
       [not found] <redmine.issue-15523.20190111044448@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2019-01-14 12:52 ` [ruby-core:91080] " muraken
@ 2019-01-14 14:15 ` muraken
  2019-01-15  3:53 ` [ruby-core:91093] [Ruby trunk Feature#15523] Let `Range#begin` and `Range#end` be aliases of Range#first and Range#last sawadatsuyoshi
  7 siblings, 0 replies; 8+ messages in thread
From: muraken @ 2019-01-14 14:15 UTC (permalink / raw)
  To: ruby-core

Issue #15523 has been updated by mrkn (Kenta Murata).


@sawa Sorry, please don't mind my previous comment.  I confused the behavior of Range and one of ArithmeticSequence.

----------------------------------------
Feature #15523: `Range#begin` and `Range#end`
https://bugs.ruby-lang.org/issues/15523#change-76310

* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
My understanding is that `Range#begin` and `Range#end`'s features are just subsets of `Range#first` and `Range#last`, respectively. And since they are slightly confusing with the keywords `begin` and `end`, I propose to either:

* Let `Range#begin` and `Range#end` be aliases of `Range#first` and `Range#last`, respectively, or
* Let `Range#begin` and `Range#end` be obsolete after a migration path of waning against their use and recommending the use of `Range#first` and `Range#last` instead.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:91093] [Ruby trunk Feature#15523] Let `Range#begin` and `Range#end` be aliases of Range#first and Range#last
       [not found] <redmine.issue-15523.20190111044448@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2019-01-14 14:15 ` [ruby-core:91081] " muraken
@ 2019-01-15  3:53 ` sawadatsuyoshi
  7 siblings, 0 replies; 8+ messages in thread
From: sawadatsuyoshi @ 2019-01-15  3:53 UTC (permalink / raw)
  To: ruby-core

Issue #15523 has been updated by sawa (Tsuyoshi Sawada).


mame (Yusuke Endoh) wrote:

> I understand that "your problem" is confusion between a keyword "begin" and "Range#begin".  First, I have never been confused by the fact.  Then,

Actually, that was a minor point (I, myself, have not been confused that much. Although I do not like the way it looks to have `begin` and `end` used as methods).

By proposing:

> > * Let Range#begin and Range#end be aliases of Range#first and Range#last, respectively, or

My real intent was that, I don't see any reason for `Range#begin` and `Range#end` to be separate methods from `Range#first` and `Range#last`. If people are indeed going to use `Range#begin` and `Range#end`, then letting them take an optional argument (just like `Range#first` and `Range#last`) would make it simple for everyone.

----------------------------------------
Feature #15523: Let `Range#begin` and `Range#end` be aliases of Range#first and Range#last
https://bugs.ruby-lang.org/issues/15523#change-76327

* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
My understanding is that `Range#begin` and `Range#end`'s features are just subsets of `Range#first` and `Range#last`, respectively. And since they are slightly confusing with the keywords `begin` and `end`, I propose to either:

* Let `Range#begin` and `Range#end` be aliases of `Range#first` and `Range#last`, respectively, or
* Let `Range#begin` and `Range#end` be obsolete after a migration path of waning against their use and recommending the use of `Range#first` and `Range#last` instead.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-15  3:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15523.20190111044448@ruby-lang.org>
2019-01-11  4:44 ` [ruby-core:91010] [Ruby trunk Bug#15523] `Range#begin` and `Range#end` sawadatsuyoshi
2019-01-11  4:45 ` [ruby-core:91011] " sawadatsuyoshi
2019-01-11  4:51 ` [ruby-core:91012] [Ruby trunk Feature#15523] " kou
2019-01-11 11:13 ` [ruby-core:91020] " shevegen
2019-01-13 13:17 ` [ruby-core:91068] " mame
2019-01-14 12:52 ` [ruby-core:91080] " muraken
2019-01-14 14:15 ` [ruby-core:91081] " muraken
2019-01-15  3:53 ` [ruby-core:91093] [Ruby trunk Feature#15523] Let `Range#begin` and `Range#end` be aliases of Range#first and Range#last sawadatsuyoshi

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 read-only IMAP folder(s) and NNTP newsgroup(s).