Regarding your first question. I have been bit by that one as well. Have a
look at

https://github.com/JuliaLang/julia/issues/6620

Med venlig hilsen

Andreas Noack

2014-09-11 8:18 GMT-04:00 Magnus Lie Hetland <[email protected]>:

> On a semi-related note, could I use an abstract class as an aggregate of
> type parameters, somehow?
>
> That is, if I have something like
>
> abstract X{T}
>
>
> t{T}(x::X{T}) = T
>
> and I have another type that takes a type parameter Y <: X, could I use
> t(Y) in the declaration of fields? It seems I can't use it directly… I
> could certainly use metaprogramming, but I was looking for something a bit
> more straightforward. The alternative, I guess, is to always pass along all
> the type parameters of Y along with Y. If I have even a hint of a hierarchy
> of nested types/type parameters, this gets unwieldy fast. What's the way to
> go here?
>

Reply via email to