Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Documentation #13811

Merged
merged 7 commits into from
Mar 31, 2020
Merged

Add Documentation #13811

merged 7 commits into from
Mar 31, 2020

Conversation

juancarlospaco
Copy link
Collaborator

  • Add more Docs and runnableExamples, only Documentation.

@@ -84,6 +84,9 @@ proc mkstemp*(prefix: string): (string, File) =
## Creates a unique temporary file from a prefix string. Adds a six chars suffix.
## The file is created with perms 0600.
## Returns the filename and a file opened in r/w mode.
runnableExamples:
let (filename, fileObj) = mkstemp(prefix = "Nim")
doAssert filename is string and fileObj is File
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this redundant? The proc signature already specifies the return type

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh, lately I've been struggling with the documentation. I recall there was someone responsible for handling documentation but I can't find the correct person to contact regarding this so I've defaulted to no action...

But I'd rather have the return type be explicitly stated in the text that describe the procedure. Because there are times where I'm uncertain of what is going to be returned by the procedure. E.g. os.walkFiles, it is going to return a string. but what is the string going to represent? is it a full path to the file? a relative path? Today I have to create a new nim file just to try this out...

I don't mind making pull requests for proposals I find from now on, but I'm not sure if you are interested in small proposals like the ones I have in mind...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xACE we're interested.

lib/posix/posix_utils.nim Outdated Show resolved Hide resolved
lib/pure/lenientops.nim Outdated Show resolved Hide resolved
@Araq Araq merged commit 42d2c30 into nim-lang:devel Mar 31, 2020
@juancarlospaco juancarlospaco deleted the moredocs branch March 31, 2020 16:17
@timotheecour timotheecour mentioned this pull request Apr 1, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants