--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/48409db0-0b20-4f47-91fd-910a239ccab7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Private functions are meant to be implementation details. You can't even call them directly. Documentation are for folks that want to use your API without reading the source code. Code comments are for those *in the source code*.
3. Get the private functions and make them public so you can properly document and test them
And here is the point: even if we allowed you to document private functions because you have internal and external devs, how are you going to segregate this information in the generated docs? Would you build two sets of documentation?
I think this request is meant to create 2 sets of documentation. In a tool called doxygen which generates docs for various c style languages, you can do exactly this. By marking functions as internal, their documentation will be omitted by default, but you can pass a flag to generate docs with internal functions included.
Even if only available inside of the modulescope, it is very useful when you have private functions which are not only meant to separate code, but to reuse he code. This second set of documentation is a good help for people who want to participate in the project, while the first set of documentation is a good thing for people who want to use the project (Eg as a library).
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAGnRm4JqO5gew7Miq%3Dth1ZcHoOYJHthNkB9U_aM1fvefcJ4sSg%40mail.gmail.com.
Yes, that is exactly what we would like to do. In our java projects we use the "-public" argument for the javadoc command and generate the integrator javadoc in one directory and the complete internal documentation in another directory.
Yes, that is exactly what we would like to do. In our java projects we use the "-public" argument for the javadoc command and generate the integrator javadoc in one directory and the complete internal documentation in another directory.So I think this is the answer to your question. You don't want to document private functions, you want to be able to say some modules should be included in the documentation and sometimes they should not. :)
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAGnRm4K20a7hFNTYMi1M9ScnH69J00xn_tkmqB6eEbY%2ByQtFiQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CA%2BbCVsvDP8CszyetCmFv8bE5hRV_%3Dp07wgjCwtcfOaW48mi_Ow%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAP%3DvNq_1rhikEE-G-6xYHWJ8PV9kt271ngb15%3DAgJYJeWm%3DsUg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CA%2BbCVsthpZzo7tP%3DZqD%2B1hkxsBMsJcqz2FAhnctFBmaeMhSs9A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAP%3DvNq_tFYY4_LRgzat0PifqAMuq8vs2XoChULEADLquxjYobg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CA%2BbCVsvU-dggD3oqVN9Hx%2BBneB-inRF_9DXxCBR2E2FnBb-fdQ%40mail.gmail.com.
the truth is that every function is an API, whether public or private, they just have different consumers. Private functions are just as much an interface as a public function -- it defines a way which a specific set of functionality is facilitated and addressed -- the difference is in its potential callers...still an interface though.
There's no plausible argument why having less information describing code function and design intent is a good idea, simply because of visibility declaration.
An interface is "a point where two systems, subjects, organizations, etc. meet and interact". In Elixir ...
valuable, and a good idea, in all cases. There's no plausible argument why having less information describing code function and design intent is a good idea, simply because of visibility declaration. Because a function is public or private
When you buy a car, they put an owner's manual in the glove box, which tells you about everything on the dashboard and how to operate the vehicle. That is documentation for the consumers of the external API -- drivers. But drivers aren't the only audience needing doc, nor is the only purpose of doc to drive the car -- some of the doc is for servicing the car and knowing how it works under the hood. Mechanics / service centers, manufacturers / vendors parts, and the manufacturers own engineers, operations folks, assembly technicians, etc.. They all need their own sets of technical doc, which the manufacturer creates and publishes. The manufacturer doesn't just publish an owner's manual for the driver and tell everyone else "can't you pop the hood, take the engine apart, and figure it out yourself?"Anyway, I'm happy to agree to disagree in regards to documentation. I haven't ever seen a codebase improved by "less documentation", or someone become a better developer by "documenting less". My real purpose was to give props to Mattias, after the thread which ensued from his original post, I wanted him to know that another organization (which values thorough documentation not only for consumers, but its own internal developers) has the exact same need.
Contracts and interfaces do not apply to private functions.
My only point is that private functions are completely internal and, as such, they should not be documented.
If you want to document a private function, move it to separate module
Private is *also* considered an API, it just has a different consumer audience.
But I am extremely curious about what kind of software projects and organizations benefit from less documentation (rhetorical...no need to reply :-).
You are once again implying I am advocating for less or no documentation...It is fine to disagree but don't distort my words.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/6b85df3a-2840-4a85-bea0-e30c2f189110%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAP%3DvNq_TG7X2GaSRHQMX2pezapvcsMAMUhU-ic%2Bp%2BP4H60UXRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAGnRm4KvHe302qjv6C6hNv8mfRdZer%3DV3TKym_w0yJa07PE32Q%40mail.gmail.com.
1. Use code comments (won't be exported)
2. Move the documentation you want to write for the private function to the public function that calls it (or the moduledoc)
3. Get the private functions and make them public (in the same or another module) so you can properly document and test them
You can't document private functions.
I just wanted to make one point, inline below.
>> 3. Get the private functions and make them public (in the same or another module) so you can properly document and test them
> This isn’t documenting a private function. It is changing your code architecture to accomplish a documentation effort.
I think this is the crux of the miscommunication. It truly isn't changing your architecture. Outside of the compile time source code of the module in question, they truly do not exist. Literally no one can use them unless they are presently editing that source code.
For this reason, I do not find any reasonable argument that they should be documentable. Failing to document them outside of the context of editing the source file is the single most architecturally true thing to do, if you appreciate what they are in the context of the beam.
There's my $0.02 in a thread that took a tone I was disappointed to read.
Josh
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAPhAwGy419R2KF6Es_59uth2oagF-%3DBZHuhnCnRSkaFO%3DQ%3DHGw%40mail.gmail.com.
There's my $0.02 in a thread that took a tone I was disappointed to read.
I wish that was how it was viewed, rather than brushing off the need by declaring private function doc as bad programming practice, or a waste of time
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/A00F4070-71DB-4BFC-9D92-8C2497979A56%40cfcl.com.
For more options, visit https://groups.google.com/d/optout.
Nobody would argue that private functions should not be documented, or that it's a waste of time...
I'm getting a little concerned following this thread. Perhaps it's just a misunderstanding.
I understand and agree with the reasons not to support the documentation of private functions in the ExDoc. There is a tradeoff between specific use cases and the objective not to confuse all other users about what private means.
However I do not understand why this use case should be dismissed. There are certainly many customs, work flows etc. in the industry many people might not approve. But should the people working in these environment not be allowed to use Elixir?
IMHO the solution should be solved through a custom package on hex.pm. developed by interested parties. If there are obstacles to implement this custom package I hope their questions will be welcome.
Keep up the good work!
Thanks, Bernd