I can attest to this being difficult to search for. I ended up having to ask on the slack channel how to do ranges.
Personally, I like the syntax, but making it easier to find would be my suggestion (e.g. referring to it as more things, spelled out, such as "range", "ellipsis", etc. in the docs so it becomes searchable). On Thursday, August 4, 2016 at 2:21:55 PM UTC-6, Richard Feldman wrote: > > Currently the way you do ranges (like, say, to create the list [ 1, 2, 3, > 4, 5 ]) is this: > > [ 1..5 ] > > This comes up super infrequently, and whenever it does, it's hard to > Google for - when you want to know things like "can I use variables in > there?" "is [1..5] going to give me 1,2,3,4,5 or 1,2,3,4?" etc. > > I'd rather drop this special syntax in favor of a simple function: > > List.range : number -> number -> List number > > It'd make for one less piece of syntax to learn, would simplify the > compiler, and personally I'd find it more convenient to use than the > special syntax. This way when I want to know how it works I can look it up > in the List docs like normal! > > Thoughts? > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
