# Types, constructors, and docstrings

**URL:** <https://discourse.julialang.org/t/types-constructors-and-docstrings/7529>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 5, 2017, 1:14pm UTC](https://discourse.julialang.org/t/types-constructors-and-docstrings/7529 "2017-12-05T13:14:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 5, 2017, 1:14pm UTC](https://discourse.julialang.org/t/types-constructors-and-docstrings/7529/1 "2017-12-05T13:14:35Z")

</div>

If I have a type with a convenience constructor

```julia
struct Foo
    x
    y
end

Foo(x) = Foo(x, x+1)

```

should I document

1. the type,
2. the constructor(s),
3. or both?

If I document both, I am not sure cross-references `[`Foo`](@ref)` go to the right place.

Related: if I did not know that `Vector(N)` created a vector of length `N` with `eltype` `Any`, how could I find that out from the help system? (not the documentation, but the docstrings proper).
