From: Matthew Kerwin Date: 2016-03-26T06:58:22+10:00 Subject: [ruby-core:74578] Re: [Ruby trunk Feature#12133] Ability to exclude start when defining a range --===============0132820403== Content-Type: multipart/alternative; boundary=001a113f9232cfcbb7052ee5d214 --001a113f9232cfcbb7052ee5d214 Content-Type: text/plain; charset=UTF-8 On 26/03/2016 6:44 AM, wrote: > > Issue #12133 has been updated by Benoit Daloze. > > > Ryan Hosford wrote: > > I'm not proposing we support non-matching parenthesis or brackets. Here's what I'm proposing: > > Am I missing something or the ability to exclude start could be done with just (start.next..last) ? > If that's the case, it seems to be too much of an effort to add new syntax, or to complicate further Range's implementation. > That's only true for ranges of discrete values. A range like: `(0.0..1.0).exclude_first` would look absolutely horrible as `0.0.next_float..1.0`, and I don't think there's even an equivalent for Rationals or Times. --001a113f9232cfcbb7052ee5d214 Content-Type: text/html; charset=UTF-8


On 26/03/2016 6:44 AM, <eregontp@gmail.com> wrote:
>
> Issue #12133 has been updated by Benoit Daloze.
>
>
> Ryan Hosford wrote:
> > I'm not proposing we support non-matching parenthesis or brackets. Here's what I'm proposing:
>
> Am I missing something or the ability to exclude start could be done with just (start.next..last) ?
> If that's the case, it seems to be too much of an effort to add new syntax, or to complicate further Range's implementation.
>

That's only true for ranges of discrete values. A range like: `(0.0..1.0).exclude_first` would look absolutely horrible as `0.0.next_float..1.0`, and I don't think there's even an equivalent for Rationals or Times.

--001a113f9232cfcbb7052ee5d214-- --===============0132820403== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Unsubscribe: --===============0132820403==--