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

Correction to sentence #2681

Closed
reagan83 opened this issue Jan 31, 2015 · 2 comments
Closed

Correction to sentence #2681

reagan83 opened this issue Jan 31, 2015 · 2 comments
Labels
content For content related issues such as new chapters, typos, etc..

Comments

@reagan83
Copy link

Chapter 1: "A Guided Tour"

The bullet point that contains this sentence: "For example, in many languages, 1 / 3 is zero, but 1 / 3.0 is a third. OCaml requires you to be explicit about which operation you're doing."

It is syntactically incorrect.

The sentence should read (note the additional period after the 1 and the divisor):

For example, in many languages, 1 / 3 is zero, but 1. /. 3.0 is a third. OCaml requires you to be explicit about which operation you're doing.

@NathanReb NathanReb added the content For content related issues such as new chapters, typos, etc.. label Sep 10, 2019
@NathanReb
Copy link
Collaborator

This is intentionally not OCaml syntax. I think the idea is to show what some languages allow and that OCaml is stricter and requires you to be explicit.

@johnwhitington
Copy link

Came here to report the same thing - but my comment was that it just seems wrong - replacing "For example, in many languages" with "For example, in OCaml" would correct it.

OCaml version 4.14.2
Enter #help;; for help.

# 1 / 3;;
- : int = 0
# 1.0 /. 3.0;;
- : float = 0.333333333333333315
Python 3.12.3 (main, Apr  9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1 / 3
0.3333333333333333
>>> 1.0 / 3.0
0.3333333333333333

And if it's not OCaml syntax, what other language uses /.? Can you take another look at this?

For the record, my printed copy (2022) reads:

"For example, in many languages, 1 / 3 is zero, but 1.0 /. 3.0 is a third."

I claim it should read:

"For example, in OCaml, 1 / 3 is zero, but 1.0 /. 3.0 is a third."

(By the way, how do I sign up to leave comments on the website? The FAQ tells me the process but doesn't actually show me where to sign up...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content For content related issues such as new chapters, typos, etc..
Projects
None yet
Development

No branches or pull requests

3 participants