Julia: `Cmds` constructor should accept `Vector{T<:ByteString}` as argument

Created on 30 Sep 2015  路  7Comments  路  Source: JuliaLang/julia

When constructing commands from a variable number of strings, the backticks syntax doesn't work, and one has to explicitly call the Cmds constructor with an array of strings as argument. This is slightly inconvenient as the constructor requires a Vector{ByteString} as argument, while the "naturally" constructed arrays have e.g. type Vector{ASCIIString}. This requires an explicit conversion to Vector{ByteString}, which is no problem, but less convenient than necessary.

I suggest to add an outer constructor that accepts Vector{T<:ByteString} or even Vector{T<:AbstractString}.

Most helpful comment

Fika?

All 7 comments

does cmd$([vector])`` work?

Should probably accept any vector of strings.

@vtjnash Yes, interpolating the array in backticks works. Thanks for the pointer.

I think this is fine with the removal of all the string types.

@KristofferC seems to have found a way to squeeze about 96 hours of work into the last 24, how does he do it?

Fika?

:D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Keno picture Keno  路  3Comments

tkoolen picture tkoolen  路  3Comments

iamed2 picture iamed2  路  3Comments

yurivish picture yurivish  路  3Comments

felixrehren picture felixrehren  路  3Comments