JuliaLang/julia — pull request #638 by carlobaldassi (2012-03-24 14:21:49+00:00)
Title: New Vector constructor idiom using ranges

I'm proposing a shortcut-constructor for Vectors from ranges.
The reasoning is that since things like `Int[1,2,5,3]` are already allowed, why not allow also `Int[1:5]` and the like?

From my point of view it's useful, since I'm doing stuff like `[i:Int | i=1:5]` all the time, and I don't see it interfering with anything else, but of course you might not like it.

I wrote a one-liner which does that using a comprehension with an implicit conversion (`Int[args...]` also converts its arguments, so it's consistent).

Example:

```
julia> Float[1:2:8]
[1.0, 3.0, 5.0, 7.0]
```