Closed
Description
Some comments regarding Source §1 documentation:
- For the section on function definition expression, we should avoid using the
map
as an example. I imagine that students will visit this Source §1 documentation in either the first or second week of the semester. They would not have learnt the list libraries and can be left confused by the example. May I suggest the example to be a simple:
(x => x * x)(3); // returns 9
I think this still illustrates the fact that function definition expressions don't require a name.
- For the section on
undefined
. The textbook is referenced with "See also textbook explanation in chapter 4."
While this is not wrong as by the URL, the explanation is located in "chapter 4", I think we should call it "Section 1.1.2". This can avoid the confusion of interpreting "chapter 4" as in "Source §4" - Throughout the documentation of math libraries function, points about "+0" and "-0" are almost always raised. In Source (or Source Academy at least), is there a distinction between these two? In the Source Academy REPL, both
+0
and-0
return0
. This can also potentially confuse students. - For
math_max
,math_min
andstringify
, the names are written withmath_max()
,math_min()
, andstringify()
respectively. This may suggest to readers that these are functions with no parameters. I'm not really sure how to best document this either. I think...
is a possibility which we can add? - Two versions of
parse_int
are documented:parse_int(str, radix)
, andparse_int(s, i)
. Reading through the descriptions, I feel that the two of them are the same. Is there a distinction between the two? - Minor: A typo in the MATH page. "An implmentation of Source does not need to check whether ...."
- Nice-to-have: When going from Source 1 main documentation to a predeclared names documentation, I can only go back to the main documentation by pressing the back button on my browser. If a user is linked directly to the predeclared names, the user has no option to go to the main documentation. May I suggest that "Source §1" in the heading of predeclared names documentation link back to the main documentation?