sbuttgereit

sbuttgereit

Phoenix.HTML.Form documentation

This is a bit of a silly question, probably nit-picky, and ultimately not too important.

I’m reviewing the Phoenix.HTML.Form documentation and something struck me as odd in the documentation: as expected the module’s struct is represented by a typespec t/0 defining the type of the struct (Phoenix.HTML.Form — Phoenix.HTML v4.3.0)… but the explanatory documentation of the struct appears separately in the “Functions” section under “%Phoenix.HTML.Form{}” (Phoenix.HTML.Form — Phoenix.HTML v4.3.0).

My question is why this bifurcation in the documentation for this struct? Is there some rationale or standard that I’m missing about documenting structs that would lead to this split? I do notice that one of the struct fields, action is left undocumented, but the split has me wondering if the action field is intentionally undocumented (maybe it’s not to be considered “public”) or if the typespec has been updated and the explanatory documentation just hasn’t been maybe because there’s two places seemingly documenting the same thing. Is the typespec in the docs only there because the typespec exists?

Just curious…

Most Liked

woylie

woylie

I would expect this @doc to be a @typedoc placed right before the @type: phoenix_html/lib/phoenix_html/form.ex at v3.3.1 · phoenixframework/phoenix_html · GitHub. Then the struct would not appear under the Functions header.

Where Next?

Popular in Discussions Top

AstonJ
Are there any Elixir or Erlang libraries that help with this? I’ve been thinking how streaming services like twitch have exploded recentl...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New
opsb
We’re considering our architecture from a viewpoint of scaling our traffic heavily over the next 6 months. Our current deployment is runn...
New
RudManusachi
What configs will make sense to put to runtime.exs? – A bit of how I configure apps: I have generic configs in config/config.exs, dev...
New
paulanthonywilson
I like Umbrella projects and pretty much always use them for personal Elixir stuff, especially Nerves things. But I don’t think this is ...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49134 226
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement