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

Documentation for read/2 #2698

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jasonhemann
Copy link
Contributor

Mirrored the wording in the docstrings for read/1 and read_term/3.

Mirrored the wording in the docstrings for `read/1` and `read_term/3`.
@@ -766,6 +766,10 @@
read_term(Stream, Term, []).
% read(Stream, Term).

%% read(+Stream, -Term).
%
% Read Term from the stream Stream with default options. **NOTE** This is not a general predicate
Copy link
Contributor

Choose a reason for hiding this comment

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

Regarding the phrasing "not a general predicate": Maybe this should instead clarify: "This predicate reads Prolog terms; for more general input, use for example phrase_from_file/2 or phrase_from_stream/2."

Copy link
Contributor

Choose a reason for hiding this comment

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

Please note that read/2 is just here for convenience, it is a thin wrapper around read_term/3 with default options. So for me IMHO this description would be enough: "Same as read_term/3 with all default options".

Simplifying docstring.
@jasonhemann
Copy link
Contributor Author

That makes sense. This PR came up b/c I was looking for the docs on read_term/3, and my Command + G took me to this on the bottom of the page. @hurufu your comment would have gotten me where I needed more directly.

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.

3 participants