melange-re / melange-re.github.io

Documentation site for Melange
https://melange.re
25 stars 6 forks source link

Port "Language" section from reasonml.github.io #173

Open jchavarri opened 6 months ago

jchavarri commented 6 months ago

Everything that is under "Language Basics" should be a section in melange.re, so we can link to it from the melange book, etc.

https://reasonml.github.io/docs/en/overview

image
davesnx commented 2 weeks ago

I don't think adding "Language" is beneficial for melange. Since Melange is mainly a compiler that supports more than 1 language. Explaining Reason or explaining OCaml will make the concept of "being a compiler" less clear.

I would prefer if we have a Syntax section where we explain this (https://github.com/melange-re/melange-re.github.io/issues/38)

feihong commented 2 weeks ago

So, I looked back at the original PR that gave birth to this issue, and I found this comment:

But on second thought, I have hesitation about it, because features like record spreading are only available in Reason syntax. 🤔

But while writing the book, I was constantly looking at the Melange and Reason docs, and speaking from my perspective as a user, I kinda wished that I didn't have to jump between them. Also, as I went further in the book, I realized there was no way to avoid talking about OCaml syntax, since error messages use them and much of the core language reference pages (that I sometimes link to) uses them too. But if Language Basics section is to cover both Reason and OCaml syntax, then it needs to be on Melange docs site, right?

I don't know if these are good enough reasons to go through with porting Language Basics section, but I think we all agree we should have a Syntax page, so I'll create a separate PR for that.