but most often, there is no need to materialize the Array and working with the more efficient range object (the result of 0.1:0.1:1) is then preferable.
I would go even further: you should almost never materialize the range. The right answer is therefore just simply 0.1:0.1:1 or maybe use the range function.
The reason I emphasize this, even though @kristoffer.carlssonās answer already mentions it, is that the misconception that you need to use collect appears to be extremely widespread. Almost everyone new to Julia seem sprinkle collect throughout their code, almost always for no good reason.
There are some legitimate uses for collect, otherwise Iād propose to change the name to something very ugly, indeed.