Question

What is the best way to typeset a function with arguments for readibility, brevity, and accuracy? I tend to put empty parentheses after the function name like func(), even if there are actually arguments for the function. I have trouble including the arguments and still feeling like the paragraph is readable.

Any thoughts on best practices for this?

Was it helpful?

Solution

I usually take that approach, but if I feel like it's going to cause confusion, I'll use ellipses like: myFunction(...)

I guess if I were good, I would use those any time I was omitting parameters from a function in text.

OTHER TIPS

I would simply be a little more careful with the name of my variables and parameters, most people will then be able to guess much more accurately what type of data you want to hold in it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top