JuliaLang/julia

Better doc for abstract types

Open

#11,234 创建于 2015年5月11日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)Julia (48,709 star) (5,773 fork)batch import
docshelp wanted

描述

While I was writing #11233 (and others) it comes to me that it is hard to figure out what functions are necessary in order to implement a subtype of an abstract type.

From the language itself, it is harder than other OO languages because the function doesn't belong to the object. methodswith helps a little but one still has to figure out what are relavant (and it has to be applied on subtypes instead of the parent abstract type).

I guess it might be very hard (if not impossible) to do it from the language itself but it would be helpful to document the exported types in Base at least. I'm not sure where/in what form is the best but I think it should answer the question: "What should I implement if I want to write my own Number/Range/etc. type"

贡献者指南