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

exercises: expand stub files #409

Closed
ee7 opened this issue Oct 22, 2022 · 0 comments · Fixed by #474
Closed

exercises: expand stub files #409

ee7 opened this issue Oct 22, 2022 · 0 comments · Fixed by #474
Assignees

Comments

@ee7
Copy link
Member

ee7 commented Oct 22, 2022

No description provided.

@ee7 ee7 self-assigned this Oct 22, 2022
ee7 added a commit that referenced this issue Jan 11, 2023
And add content to the solution stub now, rather than later. It might
otherwise be particularly difficult for a user to define `Minutes` as
a `distinct int`.

Closes: #406
Refs: #409
ee7 added a commit that referenced this issue Jan 12, 2023
Summary:

- remove `Reactor`
- rename `createInput` to `newInputCell`
- rename `createCompute` to `newComputeCell`
- make `addCallback` no longer return a callback identifier
- example: use object variant, not inheritance
- example: prefer `newFoo` over `initFoo` when creating ref object
- example: use `HashSet` for callbacks, not `Table`
- stub: initialize
- tests: don't require `Cell` to be exported
- tests: reduce number of anonymous procs
- tests: declare input variables with `var`, not `let`
- tests: wrap a long line
- config: add ee7 to contributors

This commit does not add or remove test cases.

Refs: #392
Refs: #409
Closes: #407
@ee7 ee7 closed this as completed in #474 Mar 5, 2023
ee7 added a commit that referenced this issue Mar 5, 2023
Before this commit, the user-facing solution file was empty for every
exercise apart from:

- `clock`

- `dnd-character`

- `hello-world`

- `react`

Add initial content to that file for every other exercise.

Also, check in CI that every exercise has a test/stub file pair that:

- compiles without error

- runs _with_ an error (because we want the stub to fail the tests)

This required adding the missing fields to the `Character` object in
`dnd-character`.

There are some remaining questions, such as:

- What is the best placeholder return type for a procedure that could
  return e.g. a Table, CountTable, or array?

- How should we handle parameters with default values in e.g.
  `scale-generator`, `twelve-days`, and `two-fer`?

- To what extent should we provide doc comments?

But let's consider those questions later.

One implemented decision: always use `proc` instead of `func`, to better
support debugging via `echo`.

Closes: #409
Closes: #410
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