Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Added StepRangeLen #375

Closed
wants to merge 1 commit into from
Closed

Conversation

mauro3
Copy link
Contributor

@mauro3 mauro3 commented Jul 4, 2017

Fixes #374

@timholy
Copy link
Member

timholy commented Jul 4, 2017

Maybe...the problem is that StepRangeLen fixes a whole host of issues with FloatRange. It might be better to copy JuliaLang/julia#18777 into Compat...

@mauro3
Copy link
Contributor Author

mauro3 commented Jul 4, 2017

Briefly scanning that PR suggests that it would be about 500 LOC to be added to Compat. Is that not excessive? Alternatively, I could add a warning to the README.md that there might be subtle differences?

@mauro3
Copy link
Contributor Author

mauro3 commented Jul 4, 2017

Migrating away from FloatRanges in my package, I also had to patch some more bits:

if VERSION < v"0.6.0-dev.2376"
    const StepRangeLen = FloatRange
    @compat const SRangeL{F} = StepRangeLen{F}
else
    @compat const SRangeL{F} = StepRangeLen{F,Base.TwicePrecision{F},Base.TwicePrecision{F}}
end

# this is then ok:
type A{F}
    r::SRangeL{F} # replacing r::FloatRange{F}
end

@mauro3 mauro3 changed the title Added StepRangeLen WIP: Added StepRangeLen Jul 4, 2017
@mauro3 mauro3 closed this Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants