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

Documentation: introduction.md improvements / fixes for Lasagna #728

Closed
adamazing opened this issue Mar 1, 2024 · 0 comments · Fixed by #729
Closed

Documentation: introduction.md improvements / fixes for Lasagna #728

adamazing opened this issue Mar 1, 2024 · 0 comments · Fixed by #729

Comments

@adamazing
Copy link
Contributor

I thought I'd do a few of the early challenges within the Swift track before getting into the List Ops challenge for #48in24 and spotted some things in the introduction for Lasagna that could be improved.

Explicit vs. Implicit typing

There are two paragraphs that say pretty much the same thing; explicit typing through type annotation and implicit typing by the compiler:

You can either explicitly specify the type of a variable or let the compiler [infer the type][type-infering] based on the assigned value.

When assigning a value to a variable are there two ways either through explicit typing through [type annotations][type annotations] or implicit typing.

Suggestion:

-You can either explicitly specify the type of a variable or let the compiler [infer the type][type-infering] based on the assigned value.
-                                                          
-When assigning a value to a variable are there two ways either through explicit typing through [type annotations][type annotations] or implicit typing.   
+You can either explicitly specify the type of a variable with type annotations][type annotations] or let the compiler [infer the type][type-inferring].

Functions

In the opening paragraph we talk about "a function" (singular) and say it can be "parsed" "as arguments".

In this instance (while the compiler no doubt parses the code) I think "passed" might make more sense?

Even if not, because the nominal function we're referring to is singular, I believe it should be: "as an argument".

Also in the opening paragraph, there's the nonsensical "In Swift are functions defined using...".
This should be "In Swift functions are defined using..."

Later on, where we talk about how special function arguments are, there's a spelling mistake within the link definition. I'm not sure if this is intentional as a workaround for something that requires a unique reference? s/argumment/argument/

Suggestions:

Parsed vs. passed, as arguments vs. as an argument:

-A function has a return type and can thereby be used as a value and be parsed as arguments to other functions.
+A function has a return type and can thereby be used as a value and be passed as an argument to other functions.

Word transposition (s/are functions/functions are/):

-In Swift are functions defined using the `func` keyword followed by the name of the function, arguments separated by commas, and a return type.
+In Swift functions are defined using the `func` keyword followed by the name of the function, arguments separated by commas, and a return type.

Misspelling of word argument:

-Swift arguments are a bit special compared to other languages, they use [argument labels][argumment-labels].
+Swift arguments are a bit special compared to other languages, they use [argument labels][argument-labels].
@adamazing adamazing changed the title Documentation: introduction.md improvements / fixes Documentation: introduction.md improvements / fixes for Lasagna Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant