hmemcpy / milewski-ctfp-pdf

Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source
https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
Other
10.93k stars 587 forks source link

ASCII rendering of _|_ instead of Unicode #302

Closed pragma- closed 1 year ago

pragma- commented 1 year ago

First I just want to say thanks to everyone for creating this book.

While reading the Scala edition of v34-a325ca2, around page 17, the bottom type is introduced, along with its symbol rendered in both ASCII and Unicode. I do not understand why the ASCII rendering is preferred and re-used after this introduction. Why not prefer the Unicode symbol instead?

I've included an image of the page below:

Image

pragma- commented 1 year ago

I realize this issue is nit-pickish. I understand that _|_ is the commonly used ASCII notation for this operator in Haskell [1]. I was just surprised to see it preferred in a PDF/print document over the better-looking Unicode symbol. Forgive me if I'm wasting everyone's time with this issue.

[1] https://wiki.haskell.org/Bottom

hmemcpy commented 1 year ago

This was the way it was initially written in the blog post, which was the basis for the PDF book. I also believe this is the only reference to the ASCII form in the entire text; some Haskell texts may refer to the bottom type by the ugly ASCII representation.

The point is, this is verbatim from the original text, so I'd leave it at that :)

BartoszMilewski commented 1 year ago

I guess my motivation was that since True and False were written using Haskell syntax, so should the bottom.

pragma- commented 1 year ago

Makes sense to me as it's related to the preceding Haskell code. I see that in the next chapter the Unicode notation is indeed used instead. Thanks again for this great book!