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

more updates to Markdown files #14191

Merged
merged 1 commit into from
Jan 11, 2022
Merged

Conversation

michelou
Copy link
Contributor

@michelou michelou commented Dec 30, 2021

Follow up of PR #10767, #10826, #10860, #10875, #10953, #11016, #11062, #11158, #11235 and #11480.

Brings further updates to Markdown files in docs/reference/.

PS. The above changes can be viewed in the PDF document scala3_reference.pdf (1 Mb) generated with Pandoc 2.16 (PR#11257).

For more info, see also our [paper at the ACM Scala Symposium 2021](resources/safer-exceptions.pdf).


For more info, see also our [paper at the ACM Scala Symposium 2021](https://infoscience.epfl.ch/record/290885).
Copy link
Contributor

Choose a reason for hiding this comment

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

The original link seems to work well. Why the indirection?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liufengyun Here are two facts to support the change :

  1. From the quick scan below of repository lampepfl/dotty we can see that safer-exceptions.pdf is the only PDF document (directory community-build/ excepted) :

    dotty>where /r . *.pdf |wc -l
    17
    dotty>where /r community-build *.pdf |wc -l
    16
    dotty>where /r docs *.pdf
    dotty\docs\resources\safer-exceptions.pdf
    

    Side note: The file is not needed to build Scala binaries or docs (and there exist over 800 forks of lampepfl/dotty !).

  2. Accessing PDF publications from Infoscience is the way to go IMO, e.g.

    For instance, "Dependent Object Types", the seminal paper from Nada, Adriaan and Martin, is available from Infoscience resp. is not included in lampepfl/dotty.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see now that the PDF poses a problem if we are going to build a PDF version of the spec. That sounds like a strong argument for the change.

Maybe we can remove the PDF from the repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see now that the PDF poses a problem if we are going to build a PDF version of the spec. That sounds like a strong argument for the change.

Maybe we can remove the PDF from the repo?

Indeed.


<details>
<summary>Examples</summary>
<summary>Example 1</summary>
Copy link
Contributor

Choose a reason for hiding this comment

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

There is only one example, what about:

Suggested change
<summary>Example 1</summary>
<summary>Show example</summary>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liufengyun other-new-features/experimental-defs.md is the Markdown file with the most changes.

Here are two notes about my changes to that file :

  1. The text inside the <details>-block is handled differently if generating HTML code or generating a PDF document. In particular the show/hide mechanism associated with <details>-blocks is stripped out when generating a PDF document.

  2. Initially the <details>-blocks did include all code examples for each of 5 elements of the numbered list.

    <details>
      <summary>Examples</summary>
      <pre> // code 1 </pre>
      <pre> // code 2 </pre>
      <pre> ... </pre>
    </details>

    In the PR version I choose a more modular approach where each code example is enclosed in a <details>-block with a simple introducing text "Examples : " at the end the preceding text paragraph (as encountered in the rest of the Scala 3 Reference). The end result in HTML looks as follows :

    Example 1
    // code example 1
    Example 2
    // code example 2
    Example 3
    // code example 3
    ...

    Final notes (feedback is welcome !) :

    • One possible improvement would be to add a short description for each example, e.g. "Example 1 : bla bla bla" instead of just "Example 1".
    • At some point I also considered the option to split some code examples in order to have both examples which compile correctly and examples which generate errors.

@michelou michelou requested a review from liufengyun January 1, 2022 17:29
@anatoliykmetyuk anatoliykmetyuk merged commit c9c6de6 into scala:master Jan 11, 2022
@michelou michelou deleted the scala3-docs branch January 11, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants