# Argument-specific docstrings or comments

**URL:** <https://discourse.julialang.org/t/argument-specific-docstrings-or-comments/32189>\
**Category:** Internals & Design\
**Created:** [December 12, 2019, 11:37am UTC](https://discourse.julialang.org/t/argument-specific-docstrings-or-comments/32189 "2019-12-12T11:37:02Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![mefob](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mefob](https://discourse.julialang.org/u/mefob)\
**Post date:** [February 18, 2026, 9:11am UTC](https://discourse.julialang.org/t/argument-specific-docstrings-or-comments/32189/23 "2026-02-18T09:11:20Z")

</div>

Instead of a docstring-only solution, wouldn’t it be better to have a more general solution to attach arbitrary attributes (potentially more than one) to any language element?

Ideally, the mechanism would be the same for variables, functions, function arguments etc.

- Rust provides such a mechanism, [Attributes - The Rust Reference](https://doc.rust-lang.org/reference/attributes.html), with a unified syntax.
- C++11 has a similar mechanism: [Attribute specifier sequence (since C++11) - cppreference.com](https://en.cppreference.com/w/cpp/language/attributes.html)
- C# has attributes, too: [Attributes - C# language specification | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/attributes)

These attributes could then be used by an external typechecker to implement e.g. refinement types, as recently discussed here [Would it make sense for Julia to adopt refinement types?](https://discourse.julialang.org/t/would-it-make-sense-for-julia-to-adopt-refinement-types/113586).

---

_[View the full topic](https://discourse.julialang.org/t/argument-specific-docstrings-or-comments/32189)._
