odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.73k stars 588 forks source link

Simple typo error in a interval bounds in the documentarion of Odin. #2733

Open joaocarvalhoopen opened 1 year ago

joaocarvalhoopen commented 1 year ago

Hello,

on the documentation page Overview, in the "control flow Statements" there is a small interval bounds typo:

[Odin - Overview - https://odin-lang.org/docs/overview/][https://odin-lang.org/docs/overview/]

Where it is written:

"where a..=b denotes a closed interval [a,b], i.e. the upper limit is inclusive, and a..<b denotes a half-open interval [a,b], i.e. the upper limit is exclusive."

The last interval "]" should have been, a "[" .

so it should be:

"where a..=b denotes a closed interval [a,b], i.e. the upper limit is inclusive, and a..<b denotes a half-open interval [a,b[, i.e. the upper limit is exclusive."

Thank you,

Best regards, João Carvalho

Kelimion commented 1 year ago

I think you mean [a,b), but I agree the document contains that typo.

joaocarvalhoopen commented 1 year ago

Hello Kelimion, When I studied it several decades ago, the mathematical notation for a closed and open intervals was the following:

[a, b] - interval closed at a and closed at b.

]a, b] - interval open at a and closed at b.

]a, b[ - interval open at a and open at b.

But I'm aware that there is a notation with a [ for close and ) for open, but that was not the notation I learned in high school or college :-)

Thank you,

Best regards, João Carvalho

joaocarvalhoopen commented 1 year ago

Hello,

I Just finished reading all the Overview of the Odin language, it is so complete and so well made, that it resembles a well written book on Odin.

Other then the small typo that appears at the beginning I have not found any other error or inconsistency in the text or code.

The only other thing that I have found is a really irrelevant and small inconsistency in the case of an "A", in the "Bit sets":



    A + B - union of two sets (equivalent to A | B)
    A - B - difference of two sets (A without B’s elements) (equivalent to A &~ B)
    A & B - intersection of two sets
    A | B - union of two sets (equivalent to A + B)
    A &~ B - difference of two sets (A without B’s elements) (equivalent to A - B)
    A ~ B - symmetric difference (Elements that are in A and B but not both)
    A == B - set equality
    A != B - set inequality
    A <= B - subset relation (A is a subset of B or equal to B)
    A < B - strict subset relation (A is a proper subset of B)
    A >= B - superset relation (A is a superset of B or equal to B)
    A > B - strict superset relation (A is a proper superset of B)
    e in A - set membership (A contains element e)
    e not_in A - A does not contain element e                                <--- The case "A" of the first letter of this line coment.
    incl(&A, elem) - same as A += {elem}
    excl(&A, elem) - same as A -= {elem}

``

Thank you,

Best regards,
João Carvalho