-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Allow type aliases to be used as outer constructors #3427
Comments
Apologies, but this will probably not happen. |
Can you comment on why it won't happen? I've often wanted this as well. Seems related to #1470. |
I was just going to ask the same thing. |
Closed
I would also like to find out why, has been discussed here as well https://groups.google.com/forum/#!topic/julia-users/FO-xpNDrfoM |
#1470 might make this possible. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to be able to use type aliases as outer constructors. My use case is in my latest incarnation of
OrderedDict
s, although the same applies (I think) to, e.g.,Vector{T}
.In my case, I define a base type
OrderedDictBase
and specific versions as
I'd like to be able to define
OrderedDict()
as an outer constructor,But when I do, I get
My current solution is to define the typealias as
_OrderedDict{K,V}
(https://github.com/kmsquire/OrderedCollections.jl/blob/simplified/src/OrderedDict.jl#L199).This works, but is a little inelegant.
Can this be done?
Somewhat related to @amitmurthy's comment in #3214 (comment)
The text was updated successfully, but these errors were encountered: