Skip to content

Lesson 10: Strings#2011

Merged
rv-jenkins merged 5 commits intomasterfrom
lesson_10
Jun 8, 2021
Merged

Lesson 10: Strings#2011
rv-jenkins merged 5 commits intomasterfrom
lesson_10

Conversation

@dwightguth
Copy link
Copy Markdown
Contributor

No description provided.

@dwightguth dwightguth marked this pull request as ready for review June 7, 2021 17:47
Comment on lines +37 to +48
### Exercise

Write a string literal containing the following block of text:

```
This is an example block of text.
Here is a quotation: "Hello world."
This line is indented.
ÁÉÍÓÚ
```

Use the `\t` and `\x` character escapes when doing so.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is the idea that they should kompile a definition which defines this string literal?

Or make a language which allows strings in teh K cell, and krun ... it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I mean, the idea is just to write the string literal, so they get familiar with the syntax of string literals in K.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, I guess that doesn't seem like a very fulfilling exercise, to just write down a string literal but have no way to check that it's written correctly. I would either just remove this entirely, or instead just say "Here is an example of a string literal", without asking them to do anything with it.

I guess you want to test that they can figure out how to use the \t and the \x? I'm not sure it's a useful skill. At the very least you should indicate what the code-points for the given UTF-8 strings there are, or point them to somewhere they can look it up easily.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Well, we can simply remove the exercise entirely, but there really /isn't/ a way for them to test correctness at this point because we haven't taught I/O.

@rv-jenkins rv-jenkins merged commit 2f589a3 into master Jun 8, 2021
@rv-jenkins rv-jenkins deleted the lesson_10 branch June 8, 2021 23:49
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