Hi Carlos,

I had made a request for such a feature a while back, which was closed
without being implemented (https://github.com/JuliaLang/julia/issues/3427).
Unfortunately, there wasn't much explanation as to why this was a difficult
or inefficient feature to implement.

Cheers, Kevin

On Friday, February 21, 2014, Carlos Becker <[email protected]> wrote:

> Thanks.
>
> so there is no way to create an array from its corresponding type
> otherwise?
> Is there a reason for that behind the design of julia?
>
> cheers
>
>
> ------------------------------------------
> Carlos
>
>
> On Fri, Feb 21, 2014 at 1:51 PM, Mauro 
> <[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>
> > wrote:
>
>> This works but is not pretty:
>>   Array(eltype(IdxListType),0)
>>
>> Alternatively
>>   typealias IdxType Int64
>>   IdxType[]
>>
>> On Friday, February 21, 2014 11:31:42 AM UTC, Carlos Becker wrote:
>>>
>>> Hello,
>>>
>>> this looks like a naive question, but I cannot get my way through
>>>
>>> I defined a typealias, like
>>>
>>>    typealias IdxListType Array{Int64,1}
>>>
>>> which I want to initialize empty, and then add elements with push!().
>>>
>>> My question is: how do I create an empty array of type IdxListType ?
>>>
>>> I know I can do Array( Int64, 0 ), but that doesn't use the typealias I
>>> defined,
>>> and IdxListType() is not defined either.
>>>
>>>
>>> Thanks in advance,
>>> Carlos
>>>
>>
>

Reply via email to