In MQ-215, Quest request that you use a method ("str".method()) to change the concatenated string to uppercase. The proceeding sentence says that there are both operators and methods that return transformed copies of the string rather than modifying the original.
Having my "newbie" hat on, there is the potential for confusion, as the difference between operators and methods has not been explained at this point in the quest.
The example - someString.someTransform() - does not distinguish whether an operator or method is being called. And the read the docs link, doesn't help as it takes you to a page that shows:
def upper(self) -> String
without any examples of actual usage. Unless one is familiar with the word self and its relationship to a class, one could easily assume that calling upper(family + "-" + model) would be acceptable.
Implementing some or all of the following suggestions might help prevent this potential point of confusion:
Call out the difference between an operator and method in the quest wording by changing it to "A String is Mojo’s text type, and offers operators that can concatenate two strings together ("str" + "str") and transformational methods ("str".upper()) that return a transformed copy of the string rather than changing the original."
Change "someString.someTransform" to "someString.someTransformMethod" to make it clear that a method is being called.
Add examples to the documentation page... eg
var s = "hello"
print(s.upper()) # "HELLO"
In MQ-215, Quest request that you use a method ("str".method()) to change the concatenated string to uppercase. The proceeding sentence says that there are both operators and methods that return transformed copies of the string rather than modifying the original.
Having my "newbie" hat on, there is the potential for confusion, as the difference between operators and methods has not been explained at this point in the quest.
The example -
someString.someTransform()- does not distinguish whether an operator or method is being called. And theread the docslink, doesn't help as it takes you to a page that shows:def upper(self) -> Stringwithout any examples of actual usage. Unless one is familiar with the word self and its relationship to a class, one could easily assume that calling upper(family + "-" + model) would be acceptable.
Implementing some or all of the following suggestions might help prevent this potential point of confusion:
Call out the difference between an operator and method in the quest wording by changing it to "A String is Mojo’s text type, and offers operators that can concatenate two strings together ("str" + "str") and transformational methods ("str".upper()) that return a transformed copy of the string rather than changing the original."
Change "someString.someTransform" to "someString.someTransformMethod" to make it clear that a method is being called.
Add examples to the documentation page... eg