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

Chapter 3 Confusing text #39

Open
avidrucker opened this issue Jun 21, 2021 · 0 comments
Open

Chapter 3 Confusing text #39

avidrucker opened this issue Jun 21, 2021 · 0 comments

Comments

@avidrucker
Copy link

avidrucker commented Jun 21, 2021

In Chapter 3, there are two examples of code, followed by this text:

This query takes two arguments: $ is the database itself (implicit, if no :in clause is specified) and ?name which presumably will be the name of some actor.

The above query is executed like (q query db "Sylvester Stallone"), where query is the query we just saw, and db is a database value. You can have any number of inputs to a query.

In the above query, the input pattern variable ?name is bound to a scalar - a string in this case. There are four different kinds of input: scalars, tuples, collections and relations.

I find the wording here is confusing, requiring careful re-reading to parse between "The above query" and "In the above query" which refer to, it appears to me (please correct me if I am mistaken!) the two different queries.

I suggest either:

  • labeling the examples "query A" and "query B" to be extra clear
  • refer to examples specifically as "non-reusable query" and "parameterized query", respectively
  • moving the descriptive text to be adjacent to their respective examples (and not interleaved, if this is the case)
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

No branches or pull requests

1 participant